Add new more general function search_by_ldap_attr, so it can query by cn when called, but the login attribute can set to email/employeeid