[Security][Exception] Security exception handling, login and register. TODO EmailNotFoundException and NicknameNotFoundException.

This commit is contained in:
2021-09-15 14:47:29 +01:00
parent 26af284353
commit e9d809d441
6 changed files with 34 additions and 15 deletions

View File

@@ -97,7 +97,7 @@ class Authenticator extends AbstractFormLoginAuthenticator
$user = DB::findOneBy('local_user', ['or' => ['nickname' => $nick, 'outgoing_email' => $nick]]);
} catch (Exception $e) {
throw new CustomUserMessageAuthenticationException(
_m('\'{nickname}\' doesn\'t match any registered nickname or email.', ['nickname' => $credentials['nickname']]));
_m('Invalid login credentials.'));
}
return $user;