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

@@ -73,22 +73,6 @@ class Authentication
return $hash;
}
/**
* Finds the user id belonging to a certain emailaddress.
*/
public static function getUserId($emailaddress)
{
$res = Registry::get('db')->queryValue('
SELECT id_user
FROM users
WHERE emailaddress = {string:emailaddress}',
[
'emailaddress' => $emailaddress,
]);
return empty($res) ? false : $res;
}
/**
* Verifies whether the user is currently logged in.
*/