add hasLdapEntry function