Do pagination on the dummy group backend
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
afa0f2c0d8
commit
b367027798
|
@ -177,7 +177,8 @@ class Dummy extends Backend {
|
|||
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
|
||||
if(isset($this->groups[$gid])) {
|
||||
if(empty($search)) {
|
||||
return $this->groups[$gid];
|
||||
$length = $limit < 0 ? null : $limit;
|
||||
return array_slice($this->groups[$gid], $offset, $length);
|
||||
}
|
||||
$result = array();
|
||||
foreach($this->groups[$gid] as $user) {
|
||||
|
|
Loading…
Reference in New Issue