Attempt to fix transient LDAP bug

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-05-07 18:13:04 -07:00
parent 62199f6255
commit ded61614d1

View file

@ -135,7 +135,7 @@ class LdapAd extends LdapAdConfiguration
$bind_as_user = true; $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!'); throw new Exception('Unable to validate user credentials!');
} }