LDAP: cache display names immediately on retrieval, saves tens of unecessary queries to LDAP server in the share dialog for example
add additional comments, PHPdoc and check whether it's really applicable