X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/d3ec38bee3eb1749b29726cb837a16efbec589da..refs/pull/2227/head:/app/Auth/Access/RegistrationService.php diff --git a/app/Auth/Access/RegistrationService.php b/app/Auth/Access/RegistrationService.php index 9136b37b5..b85f7ffd8 100644 --- a/app/Auth/Access/RegistrationService.php +++ b/app/Auth/Access/RegistrationService.php @@ -71,15 +71,15 @@ class RegistrationService // Start email confirmation flow if required if ($this->emailConfirmationService->confirmationRequired() && !$emailConfirmed) { $newUser->save(); - $message = ''; 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'); } - throw new UserRegistrationException($message, '/register/confirm'); } return $newUser;