Fixed error 500 when trying to log in to a non-existing user.

This commit is contained in:
flash 2023-08-06 18:22:39 +00:00
parent 0a11c5525a
commit bab8b29c5b

View file

@ -93,7 +93,7 @@ while(!empty($_POST['login']) && is_array($_POST['login'])) {
try {
$userInfo = $users->getUser($_POST['login']['username'], 'login');
} catch(RuntimeException $ex) {
} catch(Exception $ex) {
$loginAttempts->recordAttempt(false, $ipAddress, $countryCode, $userAgent, $clientInfo);
$notices[] = $loginFailedError;
break;
@ -131,7 +131,7 @@ while(!empty($_POST['login']) && is_array($_POST['login'])) {
try {
$sessionInfo = $sessions->createSession($userInfo, $ipAddress, $countryCode, $userAgent, $clientInfo);
} catch(RuntimeException $ex) {
} catch(Exception $ex) {
$notices[] = "Something broke while creating a session for you, please tell an administrator or developer about this!";
break;
}