|
|
@ -10,6 +10,7 @@ use Chamilo\CoreBundle\Entity\User; |
|
|
|
use Chamilo\CoreBundle\Repository\ExtraFieldRepository; |
|
|
|
use Chamilo\CoreBundle\Repository\ExtraFieldRepository; |
|
|
|
use Chamilo\CoreBundle\Repository\ExtraFieldValuesRepository; |
|
|
|
use Chamilo\CoreBundle\Repository\ExtraFieldValuesRepository; |
|
|
|
use Chamilo\CoreBundle\Repository\Node\UserRepository; |
|
|
|
use Chamilo\CoreBundle\Repository\Node\UserRepository; |
|
|
|
|
|
|
|
use Chamilo\CoreBundle\ServiceHelper\AccessUrlHelper; |
|
|
|
use Chamilo\CoreBundle\ServiceHelper\AuthenticationConfigHelper; |
|
|
|
use Chamilo\CoreBundle\ServiceHelper\AuthenticationConfigHelper; |
|
|
|
use ExtraField; |
|
|
|
use ExtraField; |
|
|
|
use KnpU\OAuth2ClientBundle\Client\ClientRegistry; |
|
|
|
use KnpU\OAuth2ClientBundle\Client\ClientRegistry; |
|
|
@ -34,6 +35,7 @@ class GenericAuthenticator extends AbstractAuthenticator |
|
|
|
RouterInterface $router, |
|
|
|
RouterInterface $router, |
|
|
|
UserRepository $userRepository, |
|
|
|
UserRepository $userRepository, |
|
|
|
AuthenticationConfigHelper $authenticationConfigHelper, |
|
|
|
AuthenticationConfigHelper $authenticationConfigHelper, |
|
|
|
|
|
|
|
AccessUrlHelper $urlHelper, |
|
|
|
protected readonly ExtraFieldRepository $extraFieldRepository, |
|
|
|
protected readonly ExtraFieldRepository $extraFieldRepository, |
|
|
|
protected readonly ExtraFieldValuesRepository $extraFieldValuesRepository, |
|
|
|
protected readonly ExtraFieldValuesRepository $extraFieldValuesRepository, |
|
|
|
) { |
|
|
|
) { |
|
|
@ -41,7 +43,8 @@ class GenericAuthenticator extends AbstractAuthenticator |
|
|
|
$clientRegistry, |
|
|
|
$clientRegistry, |
|
|
|
$router, |
|
|
|
$router, |
|
|
|
$userRepository, |
|
|
|
$userRepository, |
|
|
|
$authenticationConfigHelper |
|
|
|
$authenticationConfigHelper, |
|
|
|
|
|
|
|
$urlHelper, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -161,7 +164,9 @@ class GenericAuthenticator extends AbstractAuthenticator |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
$this->userRepository->updateUser($user); |
|
|
|
$this->userRepository->updateUser($user); |
|
|
|
// updateAccessUrls ? |
|
|
|
|
|
|
|
|
|
|
|
$url = $this->urlHelper->getCurrent(); |
|
|
|
|
|
|
|
$url->addUser($user); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private function getUserStatus(array $resourceOwnerData, int $defaultStatus, array $providerParams): int |
|
|
|
private function getUserStatus(array $resourceOwnerData, int $defaultStatus, array $providerParams): int |
|
|
|