mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Return error if token is incorrect
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
b00db3cc56
commit
a5b857c753
|
@ -61,6 +61,14 @@ class ResetPasswordController extends Controller
|
||||||
|
|
||||||
public function showResetForm(Request $request, $token = null)
|
public function showResetForm(Request $request, $token = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$credentials = $request->only('email', 'token');
|
||||||
|
|
||||||
|
if (is_null($this->broker()->getUser($credentials))) {
|
||||||
|
\Log::debug('Password reset form FAILED - this token is not valid.');
|
||||||
|
return redirect()->route('password.request')->with('error', trans('passwords.token'));
|
||||||
|
}
|
||||||
|
|
||||||
return view('auth.passwords.reset')->with(
|
return view('auth.passwords.reset')->with(
|
||||||
[
|
[
|
||||||
'token' => $token,
|
'token' => $token,
|
||||||
|
|
Loading…
Reference in a new issue