Authentication: replace getUserId with Member::fromEmailAddress

This commit is contained in:
2024-11-05 16:44:54 +01:00
parent 3de4e9391c
commit 9c86d2c475
4 changed files with 21 additions and 26 deletions

View File

@@ -24,7 +24,9 @@ class Login extends HTMLController
if (Authentication::checkPassword($_POST['emailaddress'], $_POST['password']))
{
parent::__construct('Login');
$_SESSION['user_id'] = Authentication::getUserId($_POST['emailaddress']);
$user = Member::fromEmailAddress($_POST['emailaddress']);
$_SESSION['user_id'] = $user->getUserId();
if (isset($_POST['redirect_url']))
header('Location: ' . base64_decode($_POST['redirect_url']));