Badman3k
02-26-2010, 10:47 AM
Hi!
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,cn=me@domain.com,fn=ContactRoot where as the DN of the private contacts look like: dn is: cn=00000048,fn=Contacts,cn=me@domain.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,
Richard
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,cn=me@domain.com,fn=ContactRoot where as the DN of the private contacts look like: dn is: cn=00000048,fn=Contacts,cn=me@domain.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,
Richard