]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/RegistrationService.php
Implement the renderPages parameter
[bookstack] / app / Auth / Access / RegistrationService.php
index 9136b37b5a86ea49f1f0a8ccaac27b1fd25eb27d..b85f7ffd83c24a0aa84b97997ee75f41735fc3b6 100644 (file)
@@ -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;