Prevent login of local users via SSO with the same username

This commit is contained in:
Jan Böhmer 2023-02-21 22:36:43 +01:00
parent e064ee4263
commit b13655e951
3 changed files with 70 additions and 1 deletions

View file

@ -63,7 +63,7 @@ final class UserChecker implements UserCheckerInterface
//Check if user is disabled. Then dont allow login
if ($user->isDisabled()) {
//throw new DisabledException();
throw new CustomUserMessageAccountStatusException($this->translator->trans('user.login_error.user_disabled'));
throw new CustomUserMessageAccountStatusException($this->translator->trans('user.login_error.user_disabled', [], 'security'));
}
}
}