Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e041365

Browse filesBrowse files
committed
Fix the retrieval of the last username when using forwarding
1 parent 5922d71 commit e041365
Copy full SHA for e041365

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ public function getLastAuthenticationError($clearSession = true)
6565
*/
6666
public function getLastUsername()
6767
{
68-
$session = $this->getRequest()->getSession();
68+
$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();
6975

7076
return null === $session ? '' : $session->get(Security::LAST_USERNAME);
7177
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.