summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Auth/LDAP.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 3c2e96e..af1d7ee 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -1122,7 +1122,7 @@ class LDAP
$search_results = ldap_search($this->conn, $root_dn, $search_filter);
- if (ldap_count_entries($this->conn, $search_results) == 0) {
+ if (!$search_result || ldap_count_entries($this->conn, $search_results) == 0) {
//message("No entries found for the user dn in " . __METHOD__);
return false;
}