Skip to content

Commit 73f0b45

Browse files
committed
Bug fixes
1 parent e869084 commit 73f0b45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/Authentication.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ static function login(string $email, string $password): bool
3434
}
3535

3636
if (password_verify($password, $currentUser['password']) && $currentUser['attempts'] < self::MAX_LOGIN_ATTEMPTS && $currentUser['enabled'] == 1) {
37-
User::login($currentUser['id']);
37+
User::login($currentUser['uuid']);
3838
} else if ($currentUser['enabled'] != 1) {
3939
throw new UserNotEnabledException('User account has been deactivated');
4040
} else if ($currentUser['attempts'] >= self::MAX_LOGIN_ATTEMPTS) {
4141
throw new TooManyAttemptsException('Too many failed login attempts');
4242
} else {
43-
User::setUser($currentUser['id'], ['attempts' => $currentUser['attempts'] + 1]);
43+
User::setUser($currentUser['uuid'], ['attempts' => $currentUser['attempts'] + 1]);
4444
throw new InvalidPasswordException('Incorrect Password');
4545
}
4646

0 commit comments

Comments
 (0)