Skip to content
Snippets Groups Projects
Commit 1120b95c authored by Demian Katz's avatar Demian Katz
Browse files

More robust LDAP reading (suggested by Tuan Nguyen).

parent 768143ed
No related merge requests found
...@@ -178,8 +178,8 @@ class LDAP extends AbstractBase ...@@ -178,8 +178,8 @@ class LDAP extends AbstractBase
); );
if ($ldapBind) { if ($ldapBind) {
// If the bind was successful, we can look up the full user info: // If the bind was successful, we can look up the full user info:
$ldapSearch = ldap_search( $ldapSearch = ldap_read(
$ldapConnection, $this->getSetting('basedn'), $ldapFilter $ldapConnection, $info[0]['dn'], 'objectclass=*'
); );
$data = ldap_get_entries($ldapConnection, $ldapSearch); $data = ldap_get_entries($ldapConnection, $ldapSearch);
return $this->processLDAPUser($data); return $this->processLDAPUser($data);
......
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