Merge branch 'develop' of https://github.com/snipe/snipe-it into develop

This commit is contained in:
snipe 2021-05-26 13:27:20 -07:00
commit 30a193502f

View file

@ -108,7 +108,7 @@ class LoginController extends Controller
Log::debug("Attempting to log user in by SAML authentication."); Log::debug("Attempting to log user in by SAML authentication.");
$user = $saml->samlLogin($samlData); $user = $saml->samlLogin($samlData);
if(!is_null($user)) { if(!is_null($user)) {
Auth::login($user, true); Auth::login($user);
} else { } else {
$username = $saml->getUsername(); $username = $saml->getUsername();
\Log::warning("SAML user '$username' could not be found in database."); \Log::warning("SAML user '$username' could not be found in database.");
@ -183,7 +183,7 @@ class LoginController extends Controller
try { try {
$user = User::where('username', '=', $remote_user)->whereNull('deleted_at')->where('activated', '=', '1')->first(); $user = User::where('username', '=', $remote_user)->whereNull('deleted_at')->where('activated', '=', '1')->first();
Log::debug("Remote user auth lookup complete"); 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) { } catch(Exception $e) {
Log::debug("There was an error authenticating the Remote user: " . $e->getMessage()); Log::debug("There was an error authenticating the Remote user: " . $e->getMessage());
} }
@ -223,7 +223,7 @@ class LoginController extends Controller
try { try {
LOG::debug("Attempting to log user in by LDAP authentication."); LOG::debug("Attempting to log user in by LDAP authentication.");
$user = $this->loginViaLdap($request); $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 // If the user was unable to login via LDAP, log the error and let them fall through to
// local authentication. // local authentication.