mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +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)");
|
LSdebug("LSldap::search() : return ".$ret->count()." objet(s)");
|
||||||
$retInfos=array();
|
$retInfos=array();
|
||||||
foreach($ret -> entries() as $entry) {
|
foreach($ret as $dn => $entry) {
|
||||||
if (!$entry instanceof Net_LDAP2_Entry) {
|
if (!$entry instanceof Net_LDAP2_Entry) {
|
||||||
LSerror :: addErrorCode('LSldap_02',"LDAP search return an ".get_class($entry).". object");
|
LSerror :: addErrorCode('LSldap_02',"LDAP search return an ".get_class($entry).". object");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$retInfos[]=array('dn' => $entry -> dn(), 'attrs' => $entry -> getValues());
|
$retInfos[]=array('dn' => $dn, 'attrs' => $entry -> getValues());
|
||||||
}
|
}
|
||||||
return $retInfos;
|
return $retInfos;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue