From d9d048f90de745e7cf950be68c8f34ea93c62f93 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Jan 2017 07:09:44 -0800 Subject: [PATCH] Fixed #2303 - redirect correctly after login --- app/Http/Controllers/Auth/LoginController.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index b9e21fcba4..b8a9303acd 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -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')); }