Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
02-26-2010, 11:47 AM #1
- Join Date
- Jun 2002
- Edinburgh, UK
- Thanked 1 Time in 1 Post
LDAP Search Query for Public Contacts
I'm having issues finding information on how to search an LDAP server for the terms I want.
Presently I have:
$result = ldap_search($conn,"dc=domain.com", "(&(cn=*))") or die ("Error in search query");
This returns all my contacts that I have stored on the server - as expected.
However, my contacts are separated into two distinct "folders" my personal contacts and my public contacts (shared with others). I want to return only those that are in the Public Contacts.
When the results are generated the DN of the Public Contacts look like this:
dn is: cn=000000f0,fn=Contacts,fn=Public Folders,firstname.lastname@example.org,fn=ContactRootwhere as the DN of the private contacts look like:
dn is: cn=00000048,fn=Contacts,email@example.com,fn=ContactRoot.
My first thoughts were to use the fn=Public Contacts, search query but that returns 0 results.
Does anyone have any ideas how this might be achieved?
Many thanks in advance,
"An expert is a person who has made all the mistakes that can be made in a very narrow field."