diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index fbdf1cc255132..cca772f5b6ff1 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -171,6 +171,7 @@ public function dn2UserName($dn) { public function getLDAPUserByLoginName($loginName) { //find out dn of the user name $attrs = $this->access->userManager->getAttributes(); + $attrs = array_values(array_filter($attrs)); //filter out empty attributes $users = $this->access->fetchUsersByLoginName($loginName, $attrs); if(count($users) < 1) { throw new NotOnLDAP('No user available for the given login name on ' .