Auth: Save user ID instead of username in auth session
This commit is contained in:
parent
70093b1376
commit
b890432e5b
4 changed files with 22 additions and 7 deletions
|
|
@ -66,7 +66,7 @@ class LoginController extends BaseController
|
|||
}
|
||||
|
||||
// Set login session
|
||||
$_SESSION['username'] = $user->getUsername();
|
||||
$_SESSION['user_id'] = $user->getId();
|
||||
return $response
|
||||
->withHeader('Location', '/')
|
||||
->withStatus(303);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue