In PHP, I’m building a function that adds a user into our Active Directory. I want to compare one the entries we have in the Active Directory already, so I can figure out what info I need to include in the addUser function.
I’ve tried:
$results = ldap_search($ad, $adDN, $filter, $attr);
$entries = ldap_get_entries($ad, $results);
print_r($entries);
$filter is a username and $attr is empty, but it only returns the user’s DN (Distinguished Name), and that’s it. If I start adding things to $attr it will return those things added.
How can I just return every attribute?
I figured out how to return every attribute: