Commit 5e26646a authored by evbevz's avatar evbevz Committed by Franco Fichtner

LDAP fix: handle legal boolean return result from searchUsers()

(cherry picked from commit 652089dd)
parent f2219ed4
......@@ -315,7 +315,7 @@ class LDAP implements IAuthConnector
$ldap_is_connected = $this->connect($this->ldapBindURL, $this->ldapBindDN, $this->ldapBindPassword);
if ($ldap_is_connected) {
$result = $this->searchUsers($username, $this->ldapAttributeUser, $this->ldapExtendedQuery);
if (count($result) > 0) {
if ($result !== false && count($result) > 0) {
$ldap_is_connected = $this->connect($this->ldapBindURL, $result[0]['dn'], $password);
return $ldap_is_connected;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment