I want to merge LDAP Users from different trees in a dedicated ou via aliasing, so I need the ability to set
LDAP_OPT_DEREF to LDAP_DEREF_SEARCHING.
I've implemented it by the attached patch, leading to an another optional configuration variable
$conf['auth']['ldap']['deref'] which can be set to the prefered dereferencing mode. e.g. LDAP_DEREF_SEARCHING in my
special case