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 e61d897 commit 67326f4Copy full SHA for 67326f4
Authentication/AuthenticationUtils.php
@@ -65,7 +65,13 @@ public function getLastAuthenticationError($clearSession = true)
65
*/
66
public function getLastUsername()
67
{
68
- $session = $this->getRequest()->getSession();
+ $request = $this->getRequest();
69
+
70
+ if ($request->attributes->has(Security::LAST_USERNAME)) {
71
+ return $request->attributes->get(Security::LAST_USERNAME);
72
+ }
73
74
+ $session = $request->getSession();
75
76
return null === $session ? '' : $session->get(Security::LAST_USERNAME);
77
}
0 commit comments