Skip to content

Commit

Permalink
Minor: Format code - refs BT#21881
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Aug 26, 2024
1 parent 2b0c9d3 commit 39f28f8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/CoreBundle/Repository/ExtraFieldValuesRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public function findLegalAcceptByItemId($itemId)

/**
* @return ExtraFieldValues|array<ExtraFieldValues>|null
*
* @throws NonUniqueResultException
*/
public function findByVariableAndValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Chamilo\CoreBundle\ServiceHelper\AuthenticationConfigHelper;
use Cocur\Slugify\SlugifyInterface;
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
use KnpU\OAuth2ClientBundle\Client\OAuth2ClientInterface;
use League\OAuth2\Client\Provider\FacebookUser;
use League\OAuth2\Client\Token\AccessToken;
use Symfony\Component\HttpFoundation\Request;
Expand Down Expand Up @@ -52,7 +51,7 @@ protected function userLoader(AccessToken $accessToken): User
$user
->setFirstname($resourceOwner->getFirstName())
->setLastname($resourceOwner->getLastName())
//->setLocale($resourceOwner->getLocale())
// ->setLocale($resourceOwner->getLocale())
->setEmail($resourceOwner->getEmail())
->setUsername($this->changeToValidChamiloLogin($resourceOwner->getEmail()))
->setPlainPassword('facebook')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function userLoader(AccessToken $accessToken): User
$user = (new User())
->setFirstname('OAuth2 User default firstname')
->setLastname('OAuth2 User default firstname')
->setEmail('oauth2user_'.$resourceOwnerId.'@'.(gethostname() or 'localhost'))
->setEmail('oauth2user_'.$resourceOwnerId.'@'.(gethostname() ?: 'localhost'))
->setUsername($username)
->setPlainPassword($username)
->setStatus(STUDENT)
Expand Down Expand Up @@ -120,7 +120,7 @@ protected function userLoader(AccessToken $accessToken): User
}

/**
* Set user information from the resource owner's data or the user itself
* Set user information from the resource owner's data or the user itself.
*/
public function saveUserInfo(User $user, array $resourceOwnerData, array $providerParams): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace Chamilo\CoreBundle\Security\Authenticator\OAuth2;

use Chamilo\CoreBundle\Entity\User;
use KnpU\OAuth2ClientBundle\Client\OAuth2ClientInterface;
use League\OAuth2\Client\Token\AccessToken;
use Stevenmaguire\OAuth2\Client\Provider\KeycloakResourceOwner;
use Symfony\Component\HttpFoundation\Request;
Expand Down

0 comments on commit 39f28f8

Please sign in to comment.