I am very new to LDAP and I made a connection between my php server and my ad server. Now I want to list all groups, so that users see if it is an admin or not (or can there be another path?).
I have this code so far:
$ldap = ldap_connect("192.168.1.108");
if ($ldap && $bind = @ldap_bind($ldap, $name."@redward.org", $pw)) {
// ldap_search e ldap_get_entries aqui eu acho, mas como?
}
I tried with ldap_search reading the manual in php.net but I could not make it work as a whole. Can anyone show me how to make it work?