Skip to content
Snippets Groups Projects
Commit 9a2c73e8 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

streamlined retrieveUsers() signature over all auth plugins FS#2919

parent 3593102d
No related branches found
No related tags found
No related merge requests found
......@@ -316,11 +316,11 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin {
*
* @author Chris Smith <chris@jalakai.co.uk>
* @param int $start index of first user to be returned
* @param int $limit max number of users to be returned
* @param int $limit max number of users to be returned, 0 for unlimited
* @param array $filter array of field/pattern pairs, null for no filter
* @return array list of userinfo (refer getUserData for internal userinfo details)
*/
public function retrieveUsers($start = 0, $limit = -1, $filter = null) {
public function retrieveUsers($start = 0, $limit = 0, $filter = null) {
msg("authorisation method does not support mass retrieval of user data", -1);
return array();
}
......
......@@ -332,7 +332,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
* @param array $filter array of field/pattern pairs, null for no filter
* @return array userinfo (refer getUserData for internal userinfo details)
*/
public function retrieveUsers($start = 0, $limit = -1, $filter = array()) {
public function retrieveUsers($start = 0, $limit = 0, $filter = array()) {
$adldap = $this->_adldap(null);
if(!$adldap) return false;
......@@ -357,7 +357,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin {
}
if($this->_filter($user, $info)) {
$result[$user] = $info;
if(($limit >= 0) && (++$count >= $limit)) break;
if(($limit > 0) && (++$count >= $limit)) break;
}
}
return $result;
......
......@@ -281,7 +281,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @param array $filter array of field/pattern pairs, null for no filter
* @return array of userinfo (refer getUserData for internal userinfo details)
*/
function retrieveUsers($start = 0, $limit = -1, $filter = array()) {
function retrieveUsers($start = 0, $limit = 0, $filter = array()) {
if(!$this->_openLDAP()) return false;
if(is_null($this->users)) {
......@@ -316,7 +316,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
if($this->_filter($user, $info)) {
$result[$user] = $info;
if(($limit >= 0) && (++$count >= $limit)) break;
if(($limit > 0) && (++$count >= $limit)) break;
}
}
return $result;
......
......@@ -352,7 +352,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin {
* @param array|string $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()) {
......
......@@ -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()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment