diff --git a/src/Illuminate/Foundation/Auth/ResetsPasswords.php b/src/Illuminate/Foundation/Auth/ResetsPasswords.php index d82093101e34..bb2339d826e7 100644 --- a/src/Illuminate/Foundation/Auth/ResetsPasswords.php +++ b/src/Illuminate/Foundation/Auth/ResetsPasswords.php @@ -223,9 +223,7 @@ public function reset(Request $request) $this->getResetValidationCustomAttributes() ); - $credentials = $request->only( - 'email', 'password', 'password_confirmation', 'token' - ); + $credentials = $this->getResetCredentials($request); $broker = $this->getBroker(); @@ -275,6 +273,19 @@ protected function getResetValidationCustomAttributes() return []; } + /** + * Get the password reset credentials from request. + * + * @param \Illuminate\Http\Request $request + * @return array + */ + protected function getResetCredentials(Request $request) + { + return $request->only( + 'email', 'password', 'password_confirmation', 'token' + ); + } + /** * Reset the given user's password. *