Merge pull request #20676 from clementhk/ldap-group

Don't remove last user in ldap group when limit is -1
This commit is contained in:
blizzz 2020-04-28 12:58:02 +02:00 committed by GitHub
commit 0c701cec56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -842,6 +842,9 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD
return $groupUsers;
}
if ($limit === -1) {
$limit = null;
}
// check for cache of the query without limit and offset
$groupUsers = $this->access->connection->getFromCache('usersInGroup-' . $gid . '-' . $search);
if (!is_null($groupUsers)) {
@ -850,9 +853,6 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD
return $groupUsers;
}
if ($limit === -1) {
$limit = null;
}
$groupDN = $this->access->groupname2dn($gid);
if (!$groupDN) {
// group couldn't be found, return empty resultset