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