Skip to content

Commit

Permalink
Merge branch '4.4' into 5.1
Browse files Browse the repository at this point in the history
* 4.4:
  [HttpFoundation] Drop int return type from parseFilesize()
  Added $translator->addLoader()
  bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException
  fix spelling
  Add check for constant in Curl client
  Revert #38614, add assert to avoid regression
  Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value
  Update PHP CS Fixer config to v2.18
  • Loading branch information
derrabus committed Jan 19, 2021
2 parents 9b0abb1 + 6934747 commit d1e048b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Provider/GuardAuthenticationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator
$user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);

if (null === $user) {
throw new UsernameNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
$e = new UsernameNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
$e->setUsername($token->getUsername());

throw $e;
}

if (!$user instanceof UserInterface) {
Expand Down

0 comments on commit d1e048b

Please sign in to comment.