As mentioned here Fixed group population for colliding full names. · igniterealtime/Openfire@fb9c6a3 · GitHub
hardcoding an Active Directory specific attribute is not a good idea, other ldap schemas / implementations may not have those attributes, for us it bricks the integration with OpenLDAP using rfc2307bis schema. The attribute distinguishedName is not present here, which leads to a NPE. Also - ldap attributes should always be configurable since one can use whatever schema he/she likes.