Hello All/grahl,

I am using $ldap_server->search(NULL, "mail=$drupal_mails[$id]"); in my project.

I just want to know is there a way to list all the email ids from the ldap.

something like this: $ldap_server->list

I would really appreciate your help on this.

Couple more thing to add to this:
I am using microsoft Active Directory.
I have many groups in Active Directory.

Comments

plingamn created an issue. See original summary.

plingamn’s picture

Issue summary: View changes
plingamn’s picture

Issue summary: View changes
grahl’s picture

Not sure what an "email id" is but I think you want a list of emails.

Have a look at this for some basic LDAP syntax: https://technet.microsoft.com/en-us/library/aa996205(v=exchg.65).aspx

search() is the right function, the processing and collation falls to you.

plingamn’s picture

Hello grahl,

Thank you very much for the help.
I used $ldap_server->search(NULL, "mail=*", array(), 0, 0, 0, NULL); and it is working perfectly fine for me.

I appreciate all your help.

--
Best
Prashanth

plingamn’s picture

Status: Active » Closed (works as designed)