]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/ForgotPasswordController.php
Added option to configure PDF export paper size
[bookstack] / app / Http / Controllers / Auth / ForgotPasswordController.php
index 3df0608f87ffad7f09754ce2f24e6d82694b716b..5e73b232ca734f6a4a5126d1b059a067ee314569 100644 (file)
@@ -43,7 +43,9 @@ class ForgotPasswordController extends Controller
      */
     public function sendResetLinkEmail(Request $request)
     {
-        $this->validate($request, ['email' => 'required|email']);
+        $this->validate($request, [
+            'email' => ['required', 'email'],
+        ]);
 
         // We will send the password reset link to this user. Once we have attempted
         // to send the link, we will examine the response then see the message we
@@ -56,7 +58,7 @@ class ForgotPasswordController extends Controller
             $this->logActivity(ActivityType::AUTH_PASSWORD_RESET, $request->get('email'));
         }
 
-        if ($response === Password::RESET_LINK_SENT || $response === Password::INVALID_USER) {
+        if (in_array($response, [Password::RESET_LINK_SENT, Password::INVALID_USER, Password::RESET_THROTTLED])) {
             $message = trans('auth.reset_password_sent', ['email' => $request->get('email')]);
             $this->showSuccessNotification($message);