Commit 2730813c5bc10434a301caa4e67a808fa173cfe7

Authored by Etienne Pallier
1 parent ad93c6d4

petit bugfix ldap anonymous

Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
src/Model/Table/LdapConnectionsTable.php
... ... @@ -200,7 +200,10 @@ class LdapConnectionsTable extends AppTable
200 200 /* CRAL
201 201 */
202 202 //$results = ldap_search($ldapConnection, $this->baseDn, $filter);
203   - $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these) or die("Could not search to LDAP server response was: " . ldap_error($ldapconn) );
  203 + if ($LDAP_ANONYMOUS)
  204 + $results = ldap_search($ldapConnection, $this->baseDn, $filter) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) );
  205 + else
  206 + $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) );
204 207 $info = ldap_get_entries($ldapConnection, $results);
205 208 //echo $info["count"]." entries returned\n";
206 209 return $info;
... ...