MediaWiki  1.23.2
ApiQueryAllUsers.php
Go to the documentation of this file.
1 <?php
33  public function __construct( $query, $moduleName ) {
34  parent::__construct( $query, $moduleName, 'au' );
35  }
36 
43  private function getCanonicalUserName( $name ) {
44  return str_replace( '_', ' ', $name );
45  }
46 
47  public function execute() {
48  $db = $this->getDB();
49  $params = $this->extractRequestParams();
50 
51  $prop = $params['prop'];
52  if ( !is_null( $prop ) ) {
53  $prop = array_flip( $prop );
54  $fld_blockinfo = isset( $prop['blockinfo'] );
55  $fld_editcount = isset( $prop['editcount'] );
56  $fld_groups = isset( $prop['groups'] );
57  $fld_rights = isset( $prop['rights'] );
58  $fld_registration = isset( $prop['registration'] );
59  $fld_implicitgroups = isset( $prop['implicitgroups'] );
60  } else {
61  $fld_blockinfo = $fld_editcount = $fld_groups = $fld_registration =
62  $fld_rights = $fld_implicitgroups = false;
63  }
64 
65  $limit = $params['limit'];
66 
67  $this->addTables( 'user' );
68  $useIndex = true;
69 
70  $dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' );
71  $from = is_null( $params['from'] ) ? null : $this->getCanonicalUserName( $params['from'] );
72  $to = is_null( $params['to'] ) ? null : $this->getCanonicalUserName( $params['to'] );
73 
74  # MySQL doesn't seem to use 'equality propagation' here, so like the
75  # ActiveUsers special page, we have to use rc_user_text for some cases.
76  $userFieldToSort = $params['activeusers'] ? 'rc_user_text' : 'user_name';
77 
78  $this->addWhereRange( $userFieldToSort, $dir, $from, $to );
79 
80  if ( !is_null( $params['prefix'] ) ) {
81  $this->addWhere( $userFieldToSort .
82  $db->buildLike( $this->getCanonicalUserName( $params['prefix'] ), $db->anyString() ) );
83  }
84 
85  if ( !is_null( $params['rights'] ) && count( $params['rights'] ) ) {
86  $groups = array();
87  foreach ( $params['rights'] as $r ) {
88  $groups = array_merge( $groups, User::getGroupsWithPermission( $r ) );
89  }
90 
91  // no group with the given right(s) exists, no need for a query
92  if ( !count( $groups ) ) {
93  $this->getResult()->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), '' );
94 
95  return;
96  }
97 
98  $groups = array_unique( $groups );
99 
100  if ( is_null( $params['group'] ) ) {
101  $params['group'] = $groups;
102  } else {
103  $params['group'] = array_unique( array_merge( $params['group'], $groups ) );
104  }
105  }
106 
107  if ( !is_null( $params['group'] ) && !is_null( $params['excludegroup'] ) ) {
108  $this->dieUsage( 'group and excludegroup cannot be used together', 'group-excludegroup' );
109  }
110 
111  if ( !is_null( $params['group'] ) && count( $params['group'] ) ) {
112  $useIndex = false;
113  // Filter only users that belong to a given group
114  $this->addTables( 'user_groups', 'ug1' );
115  $this->addJoinConds( array( 'ug1' => array( 'INNER JOIN', array( 'ug1.ug_user=user_id',
116  'ug1.ug_group' => $params['group'] ) ) ) );
117  }
118 
119  if ( !is_null( $params['excludegroup'] ) && count( $params['excludegroup'] ) ) {
120  $useIndex = false;
121  // Filter only users don't belong to a given group
122  $this->addTables( 'user_groups', 'ug1' );
123 
124  if ( count( $params['excludegroup'] ) == 1 ) {
125  $exclude = array( 'ug1.ug_group' => $params['excludegroup'][0] );
126  } else {
127  $exclude = array( $db->makeList(
128  array( 'ug1.ug_group' => $params['excludegroup'] ),
129  LIST_OR
130  ) );
131  }
132  $this->addJoinConds( array( 'ug1' => array( 'LEFT OUTER JOIN',
133  array_merge( array( 'ug1.ug_user=user_id' ), $exclude )
134  ) ) );
135  $this->addWhere( 'ug1.ug_user IS NULL' );
136  }
137 
138  if ( $params['witheditsonly'] ) {
139  $this->addWhere( 'user_editcount > 0' );
140  }
141 
142  $this->showHiddenUsersAddBlockInfo( $fld_blockinfo );
143 
144  if ( $fld_groups || $fld_rights ) {
145  // Show the groups the given users belong to
146  // request more than needed to avoid not getting all rows that belong to one user
147  $groupCount = count( User::getAllGroups() );
148  $sqlLimit = $limit + $groupCount + 1;
149 
150  $this->addTables( 'user_groups', 'ug2' );
151  $this->addJoinConds( array( 'ug2' => array( 'LEFT JOIN', 'ug2.ug_user=user_id' ) ) );
152  $this->addFields( 'ug2.ug_group ug_group2' );
153  } else {
154  $sqlLimit = $limit + 1;
155  }
156 
157  if ( $params['activeusers'] ) {
158  global $wgActiveUserDays;
159  $this->addTables( 'recentchanges' );
160 
161  $this->addJoinConds( array( 'recentchanges' => array(
162  'INNER JOIN', 'rc_user_text=user_name'
163  ) ) );
164 
165  $this->addFields( array( 'recentedits' => 'COUNT(*)' ) );
166 
167  $this->addWhere( 'rc_log_type IS NULL OR rc_log_type != ' . $db->addQuotes( 'newusers' ) );
168  $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays * 24 * 3600 );
169  $this->addWhere( 'rc_timestamp >= ' . $db->addQuotes( $timestamp ) );
170 
171  $this->addOption( 'GROUP BY', $userFieldToSort );
172  }
173 
174  $this->addOption( 'LIMIT', $sqlLimit );
175 
176  $this->addFields( array(
177  'user_name',
178  'user_id'
179  ) );
180  $this->addFieldsIf( 'user_editcount', $fld_editcount );
181  $this->addFieldsIf( 'user_registration', $fld_registration );
182 
183  if ( $useIndex ) {
184  $this->addOption( 'USE INDEX', array( 'user' => 'user_name' ) );
185  }
186 
187  $res = $this->select( __METHOD__ );
188 
189  $count = 0;
190  $lastUserData = false;
191  $lastUser = false;
192  $result = $this->getResult();
193 
194  // This loop keeps track of the last entry. For each new row, if the
195  // new row is for different user then the last, the last entry is added
196  // to results. Otherwise, the group of the new row is appended to the
197  // last entry. The setContinue... is more complex because of this, and
198  // takes into account the higher sql limit to make sure all rows that
199  // belong to the same user are received.
200 
201  foreach ( $res as $row ) {
202  $count++;
203 
204  if ( $lastUser !== $row->user_name ) {
205  // Save the last pass's user data
206  if ( is_array( $lastUserData ) ) {
207  $fit = $result->addValue( array( 'query', $this->getModuleName() ),
208  null, $lastUserData );
209 
210  $lastUserData = null;
211 
212  if ( !$fit ) {
213  $this->setContinueEnumParameter( 'from', $lastUserData['name'] );
214  break;
215  }
216  }
217 
218  if ( $count > $limit ) {
219  // We've reached the one extra which shows that there are
220  // additional pages to be had. Stop here...
221  $this->setContinueEnumParameter( 'from', $row->user_name );
222  break;
223  }
224 
225  // Record new user's data
226  $lastUser = $row->user_name;
227  $lastUserData = array(
228  'userid' => $row->user_id,
229  'name' => $lastUser,
230  );
231  if ( $fld_blockinfo && !is_null( $row->ipb_by_text ) ) {
232  $lastUserData['blockid'] = $row->ipb_id;
233  $lastUserData['blockedby'] = $row->ipb_by_text;
234  $lastUserData['blockedbyid'] = $row->ipb_by;
235  $lastUserData['blockreason'] = $row->ipb_reason;
236  $lastUserData['blockexpiry'] = $row->ipb_expiry;
237  }
238  if ( $row->ipb_deleted ) {
239  $lastUserData['hidden'] = '';
240  }
241  if ( $fld_editcount ) {
242  $lastUserData['editcount'] = intval( $row->user_editcount );
243  }
244  if ( $params['activeusers'] ) {
245  $lastUserData['recenteditcount'] = intval( $row->recentedits );
246  }
247  if ( $fld_registration ) {
248  $lastUserData['registration'] = $row->user_registration ?
249  wfTimestamp( TS_ISO_8601, $row->user_registration ) : '';
250  }
251  }
252 
253  if ( $sqlLimit == $count ) {
254  // @todo BUG! database contains group name that User::getAllGroups() does not return
255  // Should handle this more gracefully
257  __METHOD__,
258  'MediaWiki configuration error: The database contains more ' .
259  'user groups than known to User::getAllGroups() function'
260  );
261  }
262 
263  $lastUserObj = User::newFromId( $row->user_id );
264 
265  // Add user's group info
266  if ( $fld_groups ) {
267  if ( !isset( $lastUserData['groups'] ) ) {
268  if ( $lastUserObj ) {
269  $lastUserData['groups'] = $lastUserObj->getAutomaticGroups();
270  } else {
271  // This should not normally happen
272  $lastUserData['groups'] = array();
273  }
274  }
275 
276  if ( !is_null( $row->ug_group2 ) ) {
277  $lastUserData['groups'][] = $row->ug_group2;
278  }
279 
280  $result->setIndexedTagName( $lastUserData['groups'], 'g' );
281  }
282 
283  if ( $fld_implicitgroups && !isset( $lastUserData['implicitgroups'] ) && $lastUserObj ) {
284  $lastUserData['implicitgroups'] = $lastUserObj->getAutomaticGroups();
285  $result->setIndexedTagName( $lastUserData['implicitgroups'], 'g' );
286  }
287  if ( $fld_rights ) {
288  if ( !isset( $lastUserData['rights'] ) ) {
289  if ( $lastUserObj ) {
290  $lastUserData['rights'] = User::getGroupPermissions( $lastUserObj->getAutomaticGroups() );
291  } else {
292  // This should not normally happen
293  $lastUserData['rights'] = array();
294  }
295  }
296 
297  if ( !is_null( $row->ug_group2 ) ) {
298  $lastUserData['rights'] = array_unique( array_merge( $lastUserData['rights'],
299  User::getGroupPermissions( array( $row->ug_group2 ) ) ) );
300  }
301 
302  $result->setIndexedTagName( $lastUserData['rights'], 'r' );
303  }
304  }
305 
306  if ( is_array( $lastUserData ) ) {
307  $fit = $result->addValue( array( 'query', $this->getModuleName() ),
308  null, $lastUserData );
309  if ( !$fit ) {
310  $this->setContinueEnumParameter( 'from', $lastUserData['name'] );
311  }
312  }
313 
314  $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'u' );
315  }
316 
317  public function getCacheMode( $params ) {
318  return 'anon-public-user-private';
319  }
320 
321  public function getAllowedParams() {
322  $userGroups = User::getAllGroups();
323 
324  return array(
325  'from' => null,
326  'to' => null,
327  'prefix' => null,
328  'dir' => array(
329  ApiBase::PARAM_DFLT => 'ascending',
331  'ascending',
332  'descending'
333  ),
334  ),
335  'group' => array(
336  ApiBase::PARAM_TYPE => $userGroups,
337  ApiBase::PARAM_ISMULTI => true,
338  ),
339  'excludegroup' => array(
340  ApiBase::PARAM_TYPE => $userGroups,
341  ApiBase::PARAM_ISMULTI => true,
342  ),
343  'rights' => array(
345  ApiBase::PARAM_ISMULTI => true,
346  ),
347  'prop' => array(
348  ApiBase::PARAM_ISMULTI => true,
350  'blockinfo',
351  'groups',
352  'implicitgroups',
353  'rights',
354  'editcount',
355  'registration'
356  )
357  ),
358  'limit' => array(
359  ApiBase::PARAM_DFLT => 10,
360  ApiBase::PARAM_TYPE => 'limit',
361  ApiBase::PARAM_MIN => 1,
364  ),
365  'witheditsonly' => false,
366  'activeusers' => false,
367  );
368  }
369 
370  public function getParamDescription() {
371  global $wgActiveUserDays;
372 
373  return array(
374  'from' => 'The user name to start enumerating from',
375  'to' => 'The user name to stop enumerating at',
376  'prefix' => 'Search for all users that begin with this value',
377  'dir' => 'Direction to sort in',
378  'group' => 'Limit users to given group name(s)',
379  'excludegroup' => 'Exclude users in given group name(s)',
380  'rights' => 'Limit users to given right(s) (does not include rights ' .
381  'granted by implicit or auto-promoted groups like *, user, or autoconfirmed)',
382  'prop' => array(
383  'What pieces of information to include.',
384  ' blockinfo - Adds the information about a current block on the user',
385  ' groups - Lists groups that the user is in. This uses ' .
386  'more server resources and may return fewer results than the limit',
387  ' implicitgroups - Lists all the groups the user is automatically in',
388  ' rights - Lists rights that the user has',
389  ' editcount - Adds the edit count of the user',
390  ' registration - Adds the timestamp of when the user registered if available (may be blank)',
391  ),
392  'limit' => 'How many total user names to return',
393  'witheditsonly' => 'Only list users who have made edits',
394  'activeusers' => "Only list users active in the last {$wgActiveUserDays} days(s)"
395  );
396  }
397 
398  public function getResultProperties() {
399  return array(
400  '' => array(
401  'userid' => 'integer',
402  'name' => 'string',
403  'recenteditcount' => array(
404  ApiBase::PROP_TYPE => 'integer',
405  ApiBase::PROP_NULLABLE => true
406  )
407  ),
408  'blockinfo' => array(
409  'blockid' => array(
410  ApiBase::PROP_TYPE => 'integer',
411  ApiBase::PROP_NULLABLE => true
412  ),
413  'blockedby' => array(
414  ApiBase::PROP_TYPE => 'string',
415  ApiBase::PROP_NULLABLE => true
416  ),
417  'blockedbyid' => array(
418  ApiBase::PROP_TYPE => 'integer',
419  ApiBase::PROP_NULLABLE => true
420  ),
421  'blockedreason' => array(
422  ApiBase::PROP_TYPE => 'string',
423  ApiBase::PROP_NULLABLE => true
424  ),
425  'blockedexpiry' => array(
426  ApiBase::PROP_TYPE => 'string',
427  ApiBase::PROP_NULLABLE => true
428  ),
429  'hidden' => 'boolean'
430  ),
431  'editcount' => array(
432  'editcount' => 'integer'
433  ),
434  'registration' => array(
435  'registration' => 'string'
436  )
437  );
438  }
439 
440  public function getDescription() {
441  return 'Enumerate all registered users.';
442  }
443 
444  public function getPossibleErrors() {
445  return array_merge( parent::getPossibleErrors(), array(
446  array(
447  'code' => 'group-excludegroup',
448  'info' => 'group and excludegroup cannot be used together'
449  ),
450  ) );
451  }
452 
453  public function getExamples() {
454  return array(
455  'api.php?action=query&list=allusers&aufrom=Y',
456  );
457  }
458 
459  public function getHelpUrls() {
460  return 'https://www.mediawiki.org/wiki/API:Allusers';
461  }
462 }
ApiQueryBase\showHiddenUsersAddBlockInfo
showHiddenUsersAddBlockInfo( $showBlockInfo)
Filters hidden users (where the user doesn't have the right to view them) Also adds relevant block in...
Definition: ApiQueryBase.php:566
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1528
User\newFromId
static newFromId( $id)
Static factory method for creation from a given user ID.
Definition: User.php:411
ApiQueryBase\addFields
addFields( $value)
Add a set of fields to select to the internal array.
Definition: ApiQueryBase.php:117
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
ApiQueryAllUsers\getExamples
getExamples()
Returns usage examples for this module.
Definition: ApiQueryAllUsers.php:453
$timestamp
if( $limit) $timestamp
Definition: importImages.php:104
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2483
ApiBase\PARAM_TYPE
const PARAM_TYPE
Definition: ApiBase.php:50
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:205
ApiQueryBase\select
select( $method, $extraQuery=array())
Execute a SELECT query based on the values in the internal arrays.
Definition: ApiQueryBase.php:274
$from
$from
Definition: importImages.php:90
$params
$params
Definition: styleTest.css.php:40
$limit
if( $sleep) $limit
Definition: importImages.php:99
ApiQueryBase\addOption
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
Definition: ApiQueryBase.php:252
ApiQueryAllUsers\__construct
__construct( $query, $moduleName)
Definition: ApiQueryAllUsers.php:33
ApiQueryBase\addFieldsIf
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
Definition: ApiQueryBase.php:131
ApiQueryAllUsers\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
Definition: ApiQueryAllUsers.php:317
ApiBase\PARAM_MIN
const PARAM_MIN
Definition: ApiBase.php:56
LIST_OR
const LIST_OR
Definition: Defines.php:206
ApiQueryAllUsers\getCanonicalUserName
getCanonicalUserName( $name)
This function converts the user name to a canonical form which is stored in the database.
Definition: ApiQueryAllUsers.php:43
ApiQueryBase
This is a base class for all Query modules.
Definition: ApiQueryBase.php:34
ApiBase\LIMIT_BIG1
const LIMIT_BIG1
Definition: ApiBase.php:78
ApiQueryAllUsers\getAllowedParams
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition: ApiQueryAllUsers.php:321
TS_ISO_8601
const TS_ISO_8601
ISO 8601 format with no timezone: 1986-02-09T20:00:00Z.
Definition: GlobalFunctions.php:2448
ApiQueryBase\getDB
getDB()
Get the Query database connection (read-only)
Definition: ApiQueryBase.php:417
ApiBase\PARAM_MAX
const PARAM_MAX
Definition: ApiBase.php:52
ApiQueryBase\addTables
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
Definition: ApiQueryBase.php:82
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
$exclude
if(! $in) $exclude
Definition: UtfNormalGenerate.php:65
ApiBase\PROP_TYPE
const PROP_TYPE
Definition: ApiBase.php:74
ApiQueryBase\addWhereRange
addWhereRange( $field, $dir, $start, $end, $sort=true)
Add a WHERE clause corresponding to a range, and an ORDER BY clause to sort in the right direction.
Definition: ApiQueryBase.php:205
ApiBase\extractRequestParams
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
Definition: ApiBase.php:687
ApiQueryAllUsers\getDescription
getDescription()
Returns the description string for this module.
Definition: ApiQueryAllUsers.php:440
ApiQueryAllUsers\getResultProperties
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
Definition: ApiQueryAllUsers.php:398
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
ApiBase\dieUsage
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
Definition: ApiBase.php:1363
User\getGroupPermissions
static getGroupPermissions( $groups)
Get the permissions associated with a given list of groups.
Definition: User.php:4096
ApiBase\PROP_NULLABLE
const PROP_NULLABLE
Definition: ApiBase.php:76
ApiQueryBase\addJoinConds
addJoinConds( $join_conds)
Add a set of JOIN conditions to the internal array.
Definition: ApiQueryBase.php:106
User\getAllGroups
static getAllGroups()
Return the set of defined explicit groups.
Definition: User.php:4221
User\getAllRights
static getAllRights()
Get a list of all available permissions.
Definition: User.php:4233
$count
$count
Definition: UtfNormalTest2.php:96
ApiQueryAllUsers\getPossibleErrors
getPossibleErrors()
Definition: ApiQueryAllUsers.php:444
ApiBase\LIMIT_BIG2
const LIMIT_BIG2
Definition: ApiBase.php:79
$dir
if(count( $args)==0) $dir
Definition: importImages.php:49
TS_UNIX
const TS_UNIX
Unix time - the number of seconds since 1970-01-01 00:00:00 UTC.
Definition: GlobalFunctions.php:2426
ApiQueryAllUsers
Query module to enumerate all registered users.
Definition: ApiQueryAllUsers.php:32
ApiBase\PARAM_DFLT
const PARAM_DFLT
Definition: ApiBase.php:46
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
ApiBase\getModuleName
getModuleName()
Get the name of the module being executed by this instance.
Definition: ApiBase.php:148
ApiBase\PARAM_ISMULTI
const PARAM_ISMULTI
Definition: ApiBase.php:48
ApiBase\PARAM_MAX2
const PARAM_MAX2
Definition: ApiBase.php:54
ApiQueryAllUsers\getParamDescription
getParamDescription()
Returns an array of parameter descriptions.
Definition: ApiQueryAllUsers.php:370
ApiQueryBase\addWhere
addWhere( $value)
Add a set of WHERE clauses to the internal array.
Definition: ApiQueryBase.php:152
ApiQueryBase\setContinueEnumParameter
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
Definition: ApiQueryBase.php:404
ApiQueryAllUsers\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiQueryAllUsers.php:47
$query
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1105
ApiQueryAllUsers\getHelpUrls
getHelpUrls()
Definition: ApiQueryAllUsers.php:459
$res
$res
Definition: database.txt:21
ApiBase\dieDebug
static dieDebug( $method, $message)
Internal code errors should be reported with this method.
Definition: ApiBase.php:2006
User\getGroupsWithPermission
static getGroupsWithPermission( $role)
Get all the groups who have a given permission.
Definition: User.php:4123