diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-11 16:06:31 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-11 16:25:27 -0400 |
commit | 874f31b8d773cc0df3572c275d1ac42642a7f719 (patch) | |
tree | 89db1284bdd10cf570ec017a215c4ec273150e91 /lib/user/database.php | |
parent | 9d2ae5fa1f2feed1c3907747b3bccd1193cb2981 (diff) | |
download | nextcloud-server-874f31b8d773cc0df3572c275d1ac42642a7f719.tar.gz nextcloud-server-874f31b8d773cc0df3572c275d1ac42642a7f719.zip |
Make getting all users and groups the default
Diffstat (limited to 'lib/user/database.php')
-rw-r--r-- | lib/user/database.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/user/database.php b/lib/user/database.php index 968814d9d57..1deed517610 100644 --- a/lib/user/database.php +++ b/lib/user/database.php @@ -154,8 +154,12 @@ class OC_User_Database extends OC_User_Backend { * * Get a list of all users. */ - public function getUsers($search = '', $limit = 10, $offset = 0) { - $query = OC_DB::prepare('SELECT uid FROM *PREFIX*users WHERE uid LIKE ? LIMIT '.$limit.' OFFSET '.$offset); + public function getUsers($search = '', $limit = -1, $offset = 0) { + if ($limit == -1) { + $query = OC_DB::prepare('SELECT uid FROM *PREFIX*users WHERE uid LIKE ?'); + } else { + $query = OC_DB::prepare('SELECT uid FROM *PREFIX*users WHERE uid LIKE ? LIMIT '.$limit.' OFFSET '.$offset); + } $result = $query->execute(array($search.'%')); $users = array(); while ($row = $result->fetchRow()) { |