From 9a2c73e86d2549a2cd63d7f772b4bb1a3956e46f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Feb 2014 12:36:15 +0100 Subject: streamlined retrieveUsers() signature over all auth plugins FS#2919 --- lib/plugins/authpgsql/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/authpgsql/auth.php') diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index 3f8ff3249..240db80fa 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -148,7 +148,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { * @param array $filter array of field/pattern pairs * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($first = 0, $limit = 10, $filter = array()) { + public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { $out = array(); if($this->_openDB()) { -- cgit v1.2.3 From b9a6663fa7b0c5a5ac67e903ad77e0a8277029aa Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Feb 2014 12:45:58 +0100 Subject: handle limit=0 correctly in authmysql/pgsql FS#2919 --- lib/plugins/authpgsql/auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/plugins/authpgsql/auth.php') diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php index 240db80fa..e51b39858 100644 --- a/lib/plugins/authpgsql/auth.php +++ b/lib/plugins/authpgsql/auth.php @@ -154,7 +154,9 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql { if($this->_openDB()) { $this->_lockTables("READ"); $sql = $this->_createSQLFilter($this->conf['getUsers'], $filter); - $sql .= " ".$this->conf['SortOrder']." LIMIT $limit OFFSET $first"; + $sql .= " ".$this->conf['SortOrder']; + if($limit) $sql .= " LIMIT $limit"; + if($first) $sql .= " OFFSET $first"; $result = $this->_queryDB($sql); foreach($result as $user) -- cgit v1.2.3