1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Fixed issue where SAML login not notifiy on existing user

Added testing to cover

Fixes #2263
This commit is contained in:
Dan Brown
2020-09-26 16:43:06 +01:00
parent 328d2514c4
commit 53ec794e53
2 changed files with 28 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class RegistrationService
// Ensure user does not already exist
$alreadyUser = !is_null($this->userRepo->getByEmail($userEmail));
if ($alreadyUser) {
throw new UserRegistrationException(trans('errors.error_user_exists_different_creds', ['email' => $userEmail]));
throw new UserRegistrationException(trans('errors.error_user_exists_different_creds', ['email' => $userEmail]), '/login');
}
// Create the user