Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't remove last user in ldap group when limit is -1
Signed-off-by: Clement Wong <[email protected]>
  • Loading branch information
kklem0 authored and blizzz committed May 26, 2020
commit 95a647be3e87c7b0d92f4e21e70957949abd9928
6 changes: 3 additions & 3 deletions apps/user_ldap/lib/Group_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,9 @@ public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
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)) {
Expand All @@ -836,9 +839,6 @@ public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
return $groupUsers;
}

if($limit === -1) {
$limit = null;
}
$groupDN = $this->access->groupname2dn($gid);
if(!$groupDN) {
// group couldn't be found, return empty resultset
Expand Down