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."@foobar.com", $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?
I got it working with this post: http://www.php.net/manual/en/ref.ldap.php#99347 Thanks anyway Aaron.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With