From cee6f0d5792df8b5b4db6ff015388c0ca98612a5 Mon Sep 17 00:00:00 2001 From: kcoyo Date: Tue, 25 May 2021 16:37:34 -0700 Subject: [PATCH] Update LoginController.php Fixed #9607 - Sessions expire for SAML/RemoteUser/LDAP --- app/Http/Controllers/Auth/LoginController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 58c07ed23c2a..101a55bc80dc 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -108,7 +108,7 @@ private function loginViaSaml(Request $request) Log::debug("Attempting to log user in by SAML authentication."); $user = $saml->samlLogin($samlData); if(!is_null($user)) { - Auth::login($user, true); + Auth::login($user); } else { $username = $saml->getUsername(); \Log::warning("SAML user '$username' could not be found in database."); @@ -183,7 +183,7 @@ private function loginViaRemoteUser(Request $request) try { $user = User::where('username', '=', $remote_user)->whereNull('deleted_at')->where('activated', '=', '1')->first(); Log::debug("Remote user auth lookup complete"); - if(!is_null($user)) Auth::login($user, true); + if(!is_null($user)) Auth::login($user, $request->input('remember')); } catch(Exception $e) { Log::debug("There was an error authenticating the Remote user: " . $e->getMessage()); } @@ -223,7 +223,7 @@ public function login(Request $request) try { LOG::debug("Attempting to log user in by LDAP authentication."); $user = $this->loginViaLdap($request); - Auth::login($user, true); + Auth::login($user, $request->input('remember')); // If the user was unable to login via LDAP, log the error and let them fall through to // local authentication.