X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/87a5340a0526d4f46d4da676ce44f4e26039d281..refs/pull/2336/head:/app/Auth/Access/RegistrationService.php diff --git a/app/Auth/Access/RegistrationService.php b/app/Auth/Access/RegistrationService.php index 00ad630be..ecc92c117 100644 --- a/app/Auth/Access/RegistrationService.php +++ b/app/Auth/Access/RegistrationService.php @@ -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 @@ -74,6 +74,7 @@ class RegistrationService try { $this->emailConfirmationService->sendConfirmation($newUser); + session()->flash('sent-email-confirmation', true); } catch (Exception $e) { $message = trans('auth.email_confirm_send_error'); throw new UserRegistrationException($message, '/register/confirm');