]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/RegistrationService.php
Update Localization.php in Middleware with "no" tag for estimate.
[bookstack] / app / Auth / Access / RegistrationService.php
index 00ad630be23dd2cba644e679870d924c44dc721e..ecc92c117d46ccb84de50a8c2defc2c75322a3a7 100644 (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
@@ -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');