Auth: Save user ID instead of username in auth session

This commit is contained in:
Lexi / Zoe 2021-07-29 18:19:23 +02:00
parent 70093b1376
commit b890432e5b
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
4 changed files with 22 additions and 7 deletions

View file

@ -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);