3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-05 19:45:51 +00:00

Fixed #2303 - redirect correctly after login

This commit is contained in:
snipe
2017-01-12 07:09:44 -08:00
parent b7a650e986
commit d9d048f90d

View File

@ -159,15 +159,9 @@ class LoginController extends Controller
$this->clearLoginAttempts($request);
}
}
// Get the page we were before
$redirect = \Session::get('loginRedirect', 'home');
// Unset the page we were before from the session
\Session::forget('loginRedirect');
// Redirect to the users page
return redirect()->to($redirect)->with('success', trans('auth/message.signin.success'));
return redirect()->intended()->with('success', trans('auth/message.signin.success'));
}