Fix the retrieval of the last username when using forwarding
This commit is contained in:
parent
5922d715d8
commit
e04136524c
@ -65,7 +65,13 @@ class AuthenticationUtils
|
|||||||
*/
|
*/
|
||||||
public function getLastUsername()
|
public function getLastUsername()
|
||||||
{
|
{
|
||||||
$session = $this->getRequest()->getSession();
|
$request = $this->getRequest();
|
||||||
|
|
||||||
|
if ($request->attributes->has(Security::LAST_USERNAME)) {
|
||||||
|
return $request->attributes->get(Security::LAST_USERNAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
$session = $request->getSession();
|
||||||
|
|
||||||
return null === $session ? '' : $session->get(Security::LAST_USERNAME);
|
return null === $session ? '' : $session->get(Security::LAST_USERNAME);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user