ls()
-
boolean ls([string filter] [, string dn])
The ls() function only performs the search. You will need to use the fetch() function to retrieve the data.
For information on LDAP search filters, look at the ldap_search man page, or visit RFC 1558.
Example:
$ldap = new LDAP();
$ldap->cd("ou=people, dc=ypass, dc=net");
$ldap->ls();
...
$attrs[$ldap->getDN()] = $ldap->fetch();
...
$ldap->ls("(objectclass=person)");
...
$attrs[$ldap->getDN()] = $ldap->fetch();
...