title: LDAP with PHP - Get all groups for a specific member including full DN of the group
body: <p>I have this query in my application to get all groups from an LDAP-Server where a specific user is a member. Is it possible to change or extend this ldap_search() query to also return the full DN of the groups it finds?</p>
  
  <pre><code>ldap_search($conn, null, '(&amp;(objectClass=groupOfNames)(member='.$searchUser.'))', array('cn'));
  </code></pre>
  
  <p>Or is the only way to achieve this to do an ldap_get_dn() for each returned result?</p>
  
  <p>I have already tried to add 'dn' to the attributes array but that's always empty in the result set.</p>
  
  <p>Thanks!</p>