Is there anyway to produce a list of available attributes for filtering? I know it was possible in v5 by using msg_r($attributes) in ldapdata.conf.php, but how do you do it with v6? Any help would be great appreciated!!

Thanks,
Kristine

Comments

cgmonroe’s picture

Status: Active » Closed (fixed)

Clearing out old support requests - reopen if problem still exists in newest code (dev)

That said... the question here is what "available attributes" means.

If you're talking about all possible attributes that could be assigned to a user, this can be long and may vary from ldap entry to ldap entry. In LDAP each entry is based on one or more LDAP Schema objects. So user A could be based on InetOrgPerson while user B is based on organizationalPerson. Throw in different servers and different base dn's to search and it gets complicated fast.

If you're talking about listing all attributes set on a specific user, then this too can vary from user to user. You can get a list of all attributes set on a specific user with the code by using the retrieveAttributes($dn) method in the LDAPInterface object.

IMHO, rather than add a lot of code to produce a list of attributes, it is better to leave that to the mass of LDAP browser/editors that already exist. You can use these to get this information from your LDAP server (and more) and then use this in ldap_integration. Some LDAP browsers I've used are:

JXplorer - Java based, small and fairly easy to use, see the table view for all possible attributes an object can have.
phpLDAPAdmin - php web based LDAP server admin.
Apache Directory Studio - Eclipse based LDAP manager/editor.