1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00

Fix 500 error when a passwordless user creates an email session

This commit is contained in:
Steven Nguyen 2023-05-25 14:06:08 -07:00
parent 18039f5ba1
commit 7dec6c7321
No known key found for this signature in database

View file

@ -180,7 +180,7 @@ App::post('/v1/account/sessions/email')
Query::equal('email', [$email]),
]);
if (!$profile || !Auth::passwordVerify($password, $profile->getAttribute('password'), $profile->getAttribute('hash'), $profile->getAttribute('hashOptions'))) {
if (!$profile || empty($profile->getAttribute('passwordUpdate')) || !Auth::passwordVerify($password, $profile->getAttribute('password'), $profile->getAttribute('hash'), $profile->getAttribute('hashOptions'))) {
throw new Exception(Exception::USER_INVALID_CREDENTIALS);
}