diff options
author | Clement Wong <git@clement.hk> | 2020-04-27 02:28:47 +0200 |
---|---|---|
committer | Clement Wong <git@clement.hk> | 2020-04-27 02:33:00 +0200 |
commit | 9f5f505acfca368bea88cdcba551570cc0315567 (patch) | |
tree | 5db0d89214f38da38ab4930482e14d2f708356f7 /apps | |
parent | 0eeb6606796260bc3e0da3f2e6deb3a7cc522c3c (diff) | |
download | nextcloud-server-9f5f505acfca368bea88cdcba551570cc0315567.tar.gz nextcloud-server-9f5f505acfca368bea88cdcba551570cc0315567.zip |
Don't remove last user in ldap group when limit is -1
Signed-off-by: Clement Wong <git@clement.hk>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/Group_LDAP.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index f05c8fb8ca4..b7d1b0d62b8 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -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 |