Skip to content

Commit

Permalink
Don't remove last user in ldap group when limit is -1
Browse files Browse the repository at this point in the history
Signed-off-by: Clement Wong <git@clement.hk>
  • Loading branch information
kklem0 authored and backportbot[bot] committed Apr 28, 2020
1 parent c8973c6 commit 8507f9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/user_ldap/lib/Group_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,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 Down

0 comments on commit 8507f9c

Please sign in to comment.