Skip to content
Snippets Groups Projects
Commit 354d2bd0 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Fix for LDAP search for dn

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1176 44740490-163a-0410-bde0-09ae8108e29a
parent 1d3b18ea
No related branches found
No related tags found
No related merge requests found
...@@ -121,15 +121,13 @@ class SimpleSAML_Auth_LDAP { ...@@ -121,15 +121,13 @@ class SimpleSAML_Auth_LDAP {
} }
} }
// If no DN was found after traversing all base DNs, return NULL or an exception. if ($allowZeroHits) {
if (@ldap_count_entries($this->ldap, $search_result) == 0) { return NULL;
if ($allowZeroHits) { } else {
return NULL; throw new Exception('LDAP search returned zero entries: ' . $searchattr . '=' . $searchvalue . ' base(s): ' .
} else { join(' & ', $searchbases));
throw new Exception('LDAP search returned zero entries: ' . $searchattr . '=' . $searchvalue . ' base(s): ' . }
join(' & ', $searchbases));
}
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment