I am really new to LDAP and just got the connection between my php server and ad server. I successfully passed user authentication. Now I want to list all the groups in which users will see whether he is an administrator or not (or can there be another way?).
I still have this:
$ldap = ldap_connect("192.168.1.108");
if ($ldap && $bind = @ldap_bind($ldap, $name."@foobar.com", $pw)) {
// ldap_search and ldap_get_entries here i guess, but how?
}
I tried with ldap_search while reading the manual on php.net, but I could not get it to work at all. Can someone show me how to make it work?
source
share