I've got a question about the function ldap_search and a filter that I use.
Here's what the code looks like
$filter = (&(objectclass=user)(cn=$)(!memberof=cn=domain admins,cn=users,dc=domain,dc=tld))
$result = ldap_search($conn,$ou,$filter);
This doesn't work (ldap search filter error), however if I omit the ! from the !memberof, it does work. Somehow PHP doesn't like the ! (not-statement). Running the LDAP-query within AD does work just fine.