Skip to content
Snippets Groups Projects
Unverified Commit 0c701cec authored by blizzz's avatar blizzz Committed by GitHub
Browse files

Merge pull request #20676 from clementhk/ldap-group

Don't remove last user in ldap group when limit is -1
parents c69686a2 9f5f505a
No related branches found
No related tags found
No related merge requests found
...@@ -842,6 +842,9 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD ...@@ -842,6 +842,9 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD
return $groupUsers; return $groupUsers;
} }
if ($limit === -1) {
$limit = null;
}
// check for cache of the query without limit and offset // check for cache of the query without limit and offset
$groupUsers = $this->access->connection->getFromCache('usersInGroup-' . $gid . '-' . $search); $groupUsers = $this->access->connection->getFromCache('usersInGroup-' . $gid . '-' . $search);
if (!is_null($groupUsers)) { if (!is_null($groupUsers)) {
...@@ -850,9 +853,6 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD ...@@ -850,9 +853,6 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD
return $groupUsers; return $groupUsers;
} }
if ($limit === -1) {
$limit = null;
}
$groupDN = $this->access->groupname2dn($gid); $groupDN = $this->access->groupname2dn($gid);
if (!$groupDN) { if (!$groupDN) {
// group couldn't be found, return empty resultset // group couldn't be found, return empty resultset
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment