Commit 2d552aa8df4bf83902ad9ad29beadc703450632d
1 parent
1277e1a1
Exists in
master
and in
3 other branches
ldap améliorations
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
src/Model/Table/LdapConnectionsTable.php
... | ... | @@ -187,7 +187,7 @@ class LdapConnectionsTable extends AppTable |
187 | 187 | } |
188 | 188 | |
189 | 189 | // $userName = login |
190 | - public function getUserAttributes($userName, $ldapConnection, $LDAP_ANONYMOUS=true, $filter='', $just_these=[]) | |
190 | + public function getUserAttributes($userName, $ldapConnection='', $LDAP_ANONYMOUS=true, $filter='', $just_these=[]) | |
191 | 191 | { |
192 | 192 | try { |
193 | 193 | |
... | ... | @@ -207,10 +207,10 @@ class LdapConnectionsTable extends AppTable |
207 | 207 | */ |
208 | 208 | // CRAL |
209 | 209 | //$results = ldap_search($ldapConnection, $this->baseDn, $filter); |
210 | - if ($LDAP_ANONYMOUS) | |
211 | - $results = ldap_search($ldapConnection, $this->baseDn, $filter) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) ); | |
212 | - else | |
213 | - $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) ); | |
210 | + //if ($LDAP_ANONYMOUS) | |
211 | + //$results = ldap_search($ldapConnection, $this->baseDn, $filter) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) ); | |
212 | + //else | |
213 | + $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) ); | |
214 | 214 | $info = ldap_get_entries($ldapConnection, $results); |
215 | 215 | //echo $info["count"]." entries returned\n"; |
216 | 216 | return $info; | ... | ... |