mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
LSldap::search() : updated way to iterate search result
This commit is contained in:
parent
809cb9adfa
commit
dc5648272e
1 changed files with 2 additions and 2 deletions
|
@ -111,12 +111,12 @@ class LSldap {
|
|||
}
|
||||
LSdebug("LSldap::search() : return ".$ret->count()." objet(s)");
|
||||
$retInfos=array();
|
||||
foreach($ret -> entries() as $entry) {
|
||||
foreach($ret as $dn => $entry) {
|
||||
if (!$entry instanceof Net_LDAP2_Entry) {
|
||||
LSerror :: addErrorCode('LSldap_02',"LDAP search return an ".get_class($entry).". object");
|
||||
continue;
|
||||
}
|
||||
$retInfos[]=array('dn' => $entry -> dn(), 'attrs' => $entry -> getValues());
|
||||
$retInfos[]=array('dn' => $dn, 'attrs' => $entry -> getValues());
|
||||
}
|
||||
return $retInfos;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue