From ded61614d1cc2557c83a8bfce49e36e56dfe5315 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 7 May 2021 18:13:04 -0700 Subject: [PATCH] Attempt to fix transient LDAP bug Signed-off-by: snipe --- app/Services/LdapAd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/LdapAd.php b/app/Services/LdapAd.php index 925927d1fe..4bfef3d3ed 100644 --- a/app/Services/LdapAd.php +++ b/app/Services/LdapAd.php @@ -135,7 +135,7 @@ class LdapAd extends LdapAdConfiguration $bind_as_user = true; } - if ($this->ldap->auth()->attempt($login_username, $password, $bind_as_user) === false) { + if (($this->ldap) && ($this->ldap->auth()->attempt($login_username, $password, $bind_as_user) === false)) { throw new Exception('Unable to validate user credentials!'); }