diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 204995198b..0b4bdff967 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -176,12 +176,8 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn } $dn = $user->getDN(); - $userFilter = 'objectclass=*'; - if ($this->access->connection->ldapUserFilter !== '') { - $userFilter = $this->access->connection->ldapUserFilter; - } //check if user really still exists by reading its entry - if(!is_array($this->access->readAttribute($dn, '', $userFilter))) { + if(!is_array($this->access->readAttribute($dn, '', $this->access->connection->ldapUserFilter))) { $lcr = $this->access->connection->getConnectionResource(); if(is_null($lcr)) { throw new \Exception('No LDAP Connection to server ' . $this->access->connection->ldapHost);