I'm really new to LDAP and just got a connection between my php server and my ad server. I've succefully been able to authenticate users. Now I want to list all groups the users are in to see if he's an admin or not (or there might be another way?).
I have this so far:
$ldap = ldap_connect("192.168.1.108");
if ($ldap && $bind = @ldap_bind($ldap, $name."@redward.org", $pw)) {
// ldap_search and ldap_get_entries here i guess, but how?
}
I've tried with ldap_search by reading the manual at php.net but I couldn't get it to work at all. Can somebody show me how to get it to work?