diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-06-25 13:13:53 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-06-25 13:13:53 +0200 |
commit | f3ecf819ec8e6841be62603c3e8a1e255fc6522d (patch) | |
tree | e714fb0ea4121c57949f1a47e812a0ca412a6de8 /lib/private/user | |
parent | 553c2ad33abc07aff13afa75420a402875b458a4 (diff) | |
download | nextcloud-server-f3ecf819ec8e6841be62603c3e8a1e255fc6522d.tar.gz nextcloud-server-f3ecf819ec8e6841be62603c3e8a1e255fc6522d.zip |
extend Dummy user and group implementation to pass tests
Diffstat (limited to 'lib/private/user')
-rw-r--r-- | lib/private/user/dummy.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/user/dummy.php b/lib/private/user/dummy.php index 776168048f6..1d20bd31119 100644 --- a/lib/private/user/dummy.php +++ b/lib/private/user/dummy.php @@ -105,7 +105,16 @@ class OC_User_Dummy extends OC_User_Backend { * Get a list of all users. */ public function getUsers($search = '', $limit = null, $offset = null) { - return array_keys($this->users); + if(empty($search)) { + return array_keys($this->users); + } + $result = array(); + foreach($this->users as $user) { + if(stripos($user, $search) !== false) { + $result[] = $user; + } + } + return $result; } /** |