]>
BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/ForgotPasswordController.php
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3556 from GongMingCai/development
[bookstack]
/
app
/
Http
/
Controllers
/
Auth
/
ForgotPasswordController.php
diff --git
a/app/Http/Controllers/Auth/ForgotPasswordController.php
b/app/Http/Controllers/Auth/ForgotPasswordController.php
index 3df0608f87ffad7f09754ce2f24e6d82694b716b..5e73b232ca734f6a4a5126d1b059a067ee314569 100644
(file)
--- a/
app/Http/Controllers/Auth/ForgotPasswordController.php
+++ b/
app/Http/Controllers/Auth/ForgotPasswordController.php
@@
-43,7
+43,9
@@
class ForgotPasswordController extends Controller
*/
public function sendResetLinkEmail(Request $request)
{
*/
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
// 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'));
}
$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);
$message = trans('auth.reset_password_sent', ['email' => $request->get('email')]);
$this->showSuccessNotification($message);