Commit 652089dd authored by evbevz's avatar evbevz

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

parent 1ccf6b45
......@@ -333,7 +333,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