We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cee6b60 commit 6934747Copy full SHA for 6934747
Provider/GuardAuthenticationProvider.php
@@ -105,7 +105,10 @@ private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator
105
$user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
106
107
if (null === $user) {
108
- throw new UsernameNotFoundException(sprintf('Null returned from "%s::getUser()".', \get_class($guardAuthenticator)));
+ $e = new UsernameNotFoundException(sprintf('Null returned from "%s::getUser()".', \get_class($guardAuthenticator)));
109
+ $e->setUsername($token->getUsername());
110
+
111
+ throw $e;
112
}
113
114
if (!$user instanceof UserInterface) {
0 commit comments