MediaWiki  1.33.0
ApiQueryAllUsers.php
Go to the documentation of this file.
1 <?php
29  public function __construct( ApiQuery $query, $moduleName ) {
30  parent::__construct( $query, $moduleName, 'au' );
31  }
32 
39  private function getCanonicalUserName( $name ) {
40  return strtr( $name, '_', ' ' );
41  }
42 
43  public function execute() {
45 
46  $params = $this->extractRequestParams();
47  $activeUserDays = $this->getConfig()->get( 'ActiveUserDays' );
48 
49  $db = $this->getDB();
50  $commentStore = CommentStore::getStore();
51 
52  $prop = $params['prop'];
53  if ( !is_null( $prop ) ) {
54  $prop = array_flip( $prop );
55  $fld_blockinfo = isset( $prop['blockinfo'] );
56  $fld_editcount = isset( $prop['editcount'] );
57  $fld_groups = isset( $prop['groups'] );
58  $fld_rights = isset( $prop['rights'] );
59  $fld_registration = isset( $prop['registration'] );
60  $fld_implicitgroups = isset( $prop['implicitgroups'] );
61  $fld_centralids = isset( $prop['centralids'] );
62  } else {
63  $fld_blockinfo = $fld_editcount = $fld_groups = $fld_registration =
64  $fld_rights = $fld_implicitgroups = $fld_centralids = false;
65  }
66 
67  $limit = $params['limit'];
68 
69  $this->addTables( 'user' );
70 
71  $dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' );
72  $from = is_null( $params['from'] ) ? null : $this->getCanonicalUserName( $params['from'] );
73  $to = is_null( $params['to'] ) ? null : $this->getCanonicalUserName( $params['to'] );
74 
75  # MySQL can't figure out that 'user_name' and 'qcc_title' are the same
76  # despite the JOIN condition, so manually sort on the correct one.
77  $userFieldToSort = $params['activeusers'] ? 'qcc_title' : 'user_name';
78 
79  # Some of these subtable joins are going to give us duplicate rows, so
80  # calculate the maximum number of duplicates we might see.
81  $maxDuplicateRows = 1;
82 
83  $this->addWhereRange( $userFieldToSort, $dir, $from, $to );
84 
85  if ( !is_null( $params['prefix'] ) ) {
86  $this->addWhere( $userFieldToSort .
87  $db->buildLike( $this->getCanonicalUserName( $params['prefix'] ), $db->anyString() ) );
88  }
89 
90  if ( !is_null( $params['rights'] ) && count( $params['rights'] ) ) {
91  $groups = [];
92  foreach ( $params['rights'] as $r ) {
93  $groups = array_merge( $groups, User::getGroupsWithPermission( $r ) );
94  }
95 
96  // no group with the given right(s) exists, no need for a query
97  if ( $groups === [] ) {
98  $this->getResult()->addIndexedTagName( [ 'query', $this->getModuleName() ], '' );
99 
100  return;
101  }
102 
103  $groups = array_unique( $groups );
104 
105  if ( is_null( $params['group'] ) ) {
106  $params['group'] = $groups;
107  } else {
108  $params['group'] = array_unique( array_merge( $params['group'], $groups ) );
109  }
110  }
111 
112  $this->requireMaxOneParameter( $params, 'group', 'excludegroup' );
113 
114  if ( !is_null( $params['group'] ) && count( $params['group'] ) ) {
115  // Filter only users that belong to a given group. This might
116  // produce as many rows-per-user as there are groups being checked.
117  $this->addTables( 'user_groups', 'ug1' );
118  $this->addJoinConds( [
119  'ug1' => [
120  'JOIN',
121  [
122  'ug1.ug_user=user_id',
123  'ug1.ug_group' => $params['group'],
124  'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() )
125  ]
126  ]
127  ] );
128  $maxDuplicateRows *= count( $params['group'] );
129  }
130 
131  if ( !is_null( $params['excludegroup'] ) && count( $params['excludegroup'] ) ) {
132  // Filter only users don't belong to a given group. This can only
133  // produce one row-per-user, because we only keep on "no match".
134  $this->addTables( 'user_groups', 'ug1' );
135 
136  if ( count( $params['excludegroup'] ) == 1 ) {
137  $exclude = [ 'ug1.ug_group' => $params['excludegroup'][0] ];
138  } else {
139  $exclude = [ $db->makeList(
140  [ 'ug1.ug_group' => $params['excludegroup'] ],
141  LIST_OR
142  ) ];
143  }
144  $this->addJoinConds( [ 'ug1' => [ 'LEFT JOIN',
145  array_merge( [
146  'ug1.ug_user=user_id',
147  'ug1.ug_expiry IS NULL OR ug1.ug_expiry >= ' . $db->addQuotes( $db->timestamp() )
148  ], $exclude )
149  ] ] );
150  $this->addWhere( 'ug1.ug_user IS NULL' );
151  }
152 
153  if ( $params['witheditsonly'] ) {
154  $this->addWhere( 'user_editcount > 0' );
155  }
156 
157  $this->showHiddenUsersAddBlockInfo( $fld_blockinfo );
158 
159  if ( $fld_groups || $fld_rights ) {
160  $this->addFields( [ 'groups' =>
161  $db->buildGroupConcatField( '|', 'user_groups', 'ug_group', [
162  'ug_user=user_id',
163  'ug_expiry IS NULL OR ug_expiry >= ' . $db->addQuotes( $db->timestamp() )
164  ] )
165  ] );
166  }
167 
168  if ( $params['activeusers'] ) {
169  $activeUserSeconds = $activeUserDays * 86400;
170 
171  // Filter query to only include users in the active users cache.
172  // There shouldn't be any duplicate rows in querycachetwo here.
173  $this->addTables( 'querycachetwo' );
174  $this->addJoinConds( [ 'querycachetwo' => [
175  'JOIN', [
176  'qcc_type' => 'activeusers',
177  'qcc_namespace' => NS_USER,
178  'qcc_title=user_name',
179  ],
180  ] ] );
181 
182  // Actually count the actions using a subquery (T66505 and T66507)
183  $tables = [ 'recentchanges' ];
184  $joins = [];
186  $userCond = 'rc_user_text = user_name';
187  } else {
188  $tables[] = 'actor';
189  $joins['actor'] = [ 'JOIN', 'rc_actor = actor_id' ];
190  $userCond = 'actor_user = user_id';
191  }
192  $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds );
193  $this->addFields( [
194  'recentactions' => '(' . $db->selectSQLText(
195  $tables,
196  'COUNT(*)',
197  [
198  $userCond,
199  'rc_type != ' . $db->addQuotes( RC_EXTERNAL ), // no wikidata
200  'rc_log_type IS NULL OR rc_log_type != ' . $db->addQuotes( 'newusers' ),
201  'rc_timestamp >= ' . $db->addQuotes( $timestamp ),
202  ],
203  __METHOD__,
204  [],
205  $joins
206  ) . ')'
207  ] );
208  }
209 
210  $sqlLimit = $limit + $maxDuplicateRows;
211  $this->addOption( 'LIMIT', $sqlLimit );
212 
213  $this->addFields( [
214  'user_name',
215  'user_id'
216  ] );
217  $this->addFieldsIf( 'user_editcount', $fld_editcount );
218  $this->addFieldsIf( 'user_registration', $fld_registration );
219 
220  $res = $this->select( __METHOD__ );
221  $count = 0;
222  $countDuplicates = 0;
223  $lastUser = false;
224  $result = $this->getResult();
225  foreach ( $res as $row ) {
226  $count++;
227 
228  if ( $lastUser === $row->user_name ) {
229  // Duplicate row due to one of the needed subtable joins.
230  // Ignore it, but count the number of them to sanely handle
231  // miscalculation of $maxDuplicateRows.
232  $countDuplicates++;
233  if ( $countDuplicates == $maxDuplicateRows ) {
234  ApiBase::dieDebug( __METHOD__, 'Saw more duplicate rows than expected' );
235  }
236  continue;
237  }
238 
239  $countDuplicates = 0;
240  $lastUser = $row->user_name;
241 
242  if ( $count > $limit ) {
243  // We've reached the one extra which shows that there are
244  // additional pages to be had. Stop here...
245  $this->setContinueEnumParameter( 'from', $row->user_name );
246  break;
247  }
248 
249  if ( $count == $sqlLimit ) {
250  // Should never hit this (either the $countDuplicates check or
251  // the $count > $limit check should hit first), but check it
252  // anyway just in case.
253  ApiBase::dieDebug( __METHOD__, 'Saw more duplicate rows than expected' );
254  }
255 
256  if ( $params['activeusers'] && $row->recentactions === 0 ) {
257  // activeusers cache was out of date
258  continue;
259  }
260 
261  $data = [
262  'userid' => (int)$row->user_id,
263  'name' => $row->user_name,
264  ];
265 
266  if ( $fld_centralids ) {
268  $this->getConfig(), User::newFromId( $row->user_id ), $params['attachedwiki']
269  );
270  }
271 
272  if ( $fld_blockinfo && !is_null( $row->ipb_by_text ) ) {
273  $data['blockid'] = (int)$row->ipb_id;
274  $data['blockedby'] = $row->ipb_by_text;
275  $data['blockedbyid'] = (int)$row->ipb_by;
276  $data['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp );
277  $data['blockreason'] = $commentStore->getComment( 'ipb_reason', $row )->text;
278  $data['blockexpiry'] = $row->ipb_expiry;
279  }
280  if ( $row->ipb_deleted ) {
281  $data['hidden'] = true;
282  }
283  if ( $fld_editcount ) {
284  $data['editcount'] = (int)$row->user_editcount;
285  }
286  if ( $params['activeusers'] ) {
287  $data['recentactions'] = (int)$row->recentactions;
288  // @todo 'recenteditcount' is set for BC, remove in 1.25
289  $data['recenteditcount'] = $data['recentactions'];
290  }
291  if ( $fld_registration ) {
292  $data['registration'] = $row->user_registration ?
293  wfTimestamp( TS_ISO_8601, $row->user_registration ) : '';
294  }
295 
296  if ( $fld_implicitgroups || $fld_groups || $fld_rights ) {
297  $implicitGroups = User::newFromId( $row->user_id )->getAutomaticGroups();
298  if ( isset( $row->groups ) && $row->groups !== '' ) {
299  $groups = array_merge( $implicitGroups, explode( '|', $row->groups ) );
300  } else {
301  $groups = $implicitGroups;
302  }
303 
304  if ( $fld_groups ) {
305  $data['groups'] = $groups;
306  ApiResult::setIndexedTagName( $data['groups'], 'g' );
307  ApiResult::setArrayType( $data['groups'], 'array' );
308  }
309 
310  if ( $fld_implicitgroups ) {
311  $data['implicitgroups'] = $implicitGroups;
312  ApiResult::setIndexedTagName( $data['implicitgroups'], 'g' );
313  ApiResult::setArrayType( $data['implicitgroups'], 'array' );
314  }
315 
316  if ( $fld_rights ) {
317  $data['rights'] = User::getGroupPermissions( $groups );
318  ApiResult::setIndexedTagName( $data['rights'], 'r' );
319  ApiResult::setArrayType( $data['rights'], 'array' );
320  }
321  }
322 
323  $fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $data );
324  if ( !$fit ) {
325  $this->setContinueEnumParameter( 'from', $data['name'] );
326  break;
327  }
328  }
329 
330  $result->addIndexedTagName( [ 'query', $this->getModuleName() ], 'u' );
331  }
332 
333  public function getCacheMode( $params ) {
334  return 'anon-public-user-private';
335  }
336 
337  public function getAllowedParams() {
338  $userGroups = User::getAllGroups();
339 
340  return [
341  'from' => null,
342  'to' => null,
343  'prefix' => null,
344  'dir' => [
345  ApiBase::PARAM_DFLT => 'ascending',
347  'ascending',
348  'descending'
349  ],
350  ],
351  'group' => [
352  ApiBase::PARAM_TYPE => $userGroups,
353  ApiBase::PARAM_ISMULTI => true,
354  ],
355  'excludegroup' => [
356  ApiBase::PARAM_TYPE => $userGroups,
357  ApiBase::PARAM_ISMULTI => true,
358  ],
359  'rights' => [
361  ApiBase::PARAM_ISMULTI => true,
362  ],
363  'prop' => [
364  ApiBase::PARAM_ISMULTI => true,
366  'blockinfo',
367  'groups',
368  'implicitgroups',
369  'rights',
370  'editcount',
371  'registration',
372  'centralids',
373  ],
375  ],
376  'limit' => [
377  ApiBase::PARAM_DFLT => 10,
378  ApiBase::PARAM_TYPE => 'limit',
379  ApiBase::PARAM_MIN => 1,
382  ],
383  'witheditsonly' => false,
384  'activeusers' => [
385  ApiBase::PARAM_DFLT => false,
387  'apihelp-query+allusers-param-activeusers',
388  $this->getConfig()->get( 'ActiveUserDays' )
389  ],
390  ],
391  'attachedwiki' => null,
392  ];
393  }
394 
395  protected function getExamplesMessages() {
396  return [
397  'action=query&list=allusers&aufrom=Y'
398  => 'apihelp-query+allusers-example-Y',
399  ];
400  }
401 
402  public function getHelpUrls() {
403  return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Allusers';
404  }
405 }
ContextSource\getConfig
getConfig()
Definition: ContextSource.php:63
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:462
if
if($IP===false)
Definition: cleanupArchiveUserText.php:4
User\newFromId
static newFromId( $id)
Static factory method for creation from a given user ID.
Definition: User.php:609
ApiQueryBase\addFields
addFields( $value)
Add a set of fields to select to the internal array.
Definition: ApiQueryBase.php:190
RC_EXTERNAL
const RC_EXTERNAL
Definition: Defines.php:145
ApiQuery
This is the main query class.
Definition: ApiQuery.php:36
ApiQueryAllUsers\getExamplesMessages
getExamplesMessages()
Returns usage examples for this module.
Definition: ApiQueryAllUsers.php:395
captcha-old.count
count
Definition: captcha-old.py:249
ApiBase\PARAM_HELP_MSG
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
Definition: ApiBase.php:124
$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. Return false to stop further processing of the tag $reader:XMLReader object $logInfo:Array of information 'ImportHandlePageXMLTag':When parsing a XML tag in a page. Return false to stop further processing of the tag $reader:XMLReader object & $pageInfo:Array of information 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. Return false to stop further processing of the tag $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. Return false to stop further processing of the tag $reader:XMLReader object 'ImportHandleUnknownUser':When a user doesn 't exist locally, this hook is called to give extensions an opportunity to auto-create it. If the auto-creation is successful, return false. $name:User name 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. Return false to stop further processing of the tag $reader:XMLReader object $revisionInfo:Array of information 'ImportLogInterwikiLink':Hook to change the interwiki link used in log entries and edit summaries for transwiki imports. & $fullInterwikiPrefix:Interwiki prefix, may contain colons. & $pageTitle:String that contains page title. 'ImportSources':Called when reading from the $wgImportSources configuration variable. Can be used to lazy-load the import sources list. & $importSources:The value of $wgImportSources. Modify as necessary. See the comment in DefaultSettings.php for the detail of how to structure this array. '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 '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 '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 '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. '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 IP::isTrustedProxy() & $ip:IP being check & $result:Change this value to override the result of IP::isTrustedProxy() '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 Sanitizer::validateEmail(), 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 '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:Array with elements of the form "language:title" in the order that they will be output. & $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. 'LanguageSelector':Hook to change the language selector available on a page. $out:The output page. $cssClassName:CSS class name of the language selector. 'LinkBegin':DEPRECATED since 1.28! Use HtmlPageLinkRendererBegin instead. 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:1983
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:1912
ApiBase\PARAM_TYPE
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
Definition: ApiBase.php:87
ApiBase\getResult
getResult()
Get the result object.
Definition: ApiBase.php:632
$params
$params
Definition: styleTest.css.php:44
$res
$res
Definition: database.txt:21
ApiQueryBase\addOption
addOption( $name, $value=null)
Add an option such as LIMIT or USE INDEX.
Definition: ApiQueryBase.php:347
ApiQueryBase\addFieldsIf
addFieldsIf( $value, $condition)
Same as addFields(), but add the fields only if a condition is met.
Definition: ApiQueryBase.php:204
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
ApiQueryAllUsers\getCacheMode
getCacheMode( $params)
Get the cache mode for the data generated by this module.
Definition: ApiQueryAllUsers.php:333
$query
null for the wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1588
ApiBase\PARAM_MIN
const PARAM_MIN
(integer) Lowest value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition: ApiBase.php:99
$data
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
Definition: generatePhpCharToUpperMappings.php:13
ApiResult\setArrayType
static setArrayType(array &$arr, $type, $kvpKeyName=null)
Set the array data type.
Definition: ApiResult.php:728
LIST_OR
const LIST_OR
Definition: Defines.php:46
ApiQueryAllUsers\getCanonicalUserName
getCanonicalUserName( $name)
This function converts the user name to a canonical form which is stored in the database.
Definition: ApiQueryAllUsers.php:39
ApiQueryBase
This is a base class for all Query modules.
Definition: ApiQueryBase.php:33
ApiBase\LIMIT_BIG1
const LIMIT_BIG1
Fast query, standard limit.
Definition: ApiBase.php:252
ApiQueryAllUsers\getAllowedParams
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Definition: ApiQueryAllUsers.php:337
ApiQueryBase\getDB
getDB()
Get the Query database connection (read-only)
Definition: ApiQueryBase.php:105
ApiBase\PARAM_MAX
const PARAM_MAX
(integer) Max value allowed for the parameter, for PARAM_TYPE 'integer' and 'limit'.
Definition: ApiBase.php:90
ApiQueryBase\addTables
addTables( $tables, $alias=null)
Add a set of tables to the internal array.
Definition: ApiQueryBase.php:158
ApiQueryBase\select
select( $method, $extraQuery=[], array &$hookData=null)
Execute a SELECT query based on the values in the internal arrays.
Definition: ApiQueryBase.php:372
ApiBase\extractRequestParams
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
Definition: ApiBase.php:743
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:300
null
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
Definition: hooks.txt:780
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:271
ApiResult\setIndexedTagName
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
Definition: ApiResult.php:616
User\getGroupPermissions
static getGroupPermissions( $groups)
Get the permissions associated with a given list of groups.
Definition: User.php:5015
ApiQueryBase\addJoinConds
addJoinConds( $join_conds)
Add a set of JOIN conditions to the internal array.
Definition: ApiQueryBase.php:179
User\getAllGroups
static getAllGroups()
Return the set of defined explicit groups.
Definition: User.php:5134
ApiBase\requireMaxOneParameter
requireMaxOneParameter( $params, $required)
Die if more than one of a certain set of parameters is set and not false.
Definition: ApiBase.php:913
User\getAllRights
static getAllRights()
Get a list of all available permissions.
Definition: User.php:5146
ApiBase\LIMIT_BIG2
const LIMIT_BIG2
Fast query, apihighlimits limit.
Definition: ApiBase.php:254
ApiQueryBase\$tables
$tables
Definition: ApiQueryBase.php:35
ApiQueryAllUsers
Query module to enumerate all registered users.
Definition: ApiQueryAllUsers.php:28
ApiBase\PARAM_DFLT
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
Definition: ApiBase.php:48
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:512
ApiBase\PARAM_ISMULTI
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
Definition: ApiBase.php:51
NS_USER
const NS_USER
Definition: Defines.php:66
ApiBase\PARAM_MAX2
const PARAM_MAX2
(integer) Max value allowed for the parameter for users with the apihighlimits right,...
Definition: ApiBase.php:96
ApiQueryBase\addWhere
addWhere( $value)
Add a set of WHERE clauses to the internal array.
Definition: ApiQueryBase.php:225
ApiQueryUserInfo\getCentralUserInfo
static getCentralUserInfo(Config $config, User $user, $attachedWiki=null)
Get central user info.
Definition: ApiQueryUserInfo.php:92
ApiQueryBase\setContinueEnumParameter
setContinueEnumParameter( $paramName, $paramValue)
Set a query-continue value.
Definition: ApiQueryBase.php:559
ApiQueryAllUsers\execute
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
Definition: ApiQueryAllUsers.php:43
ApiBase\PARAM_HELP_MSG_PER_VALUE
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...
Definition: ApiBase.php:157
CommentStore\getStore
static getStore()
Definition: CommentStore.php:130
ApiQueryAllUsers\getHelpUrls
getHelpUrls()
Return links to more detailed help pages about the module.
Definition: ApiQueryAllUsers.php:402
ApiQueryAllUsers\__construct
__construct(ApiQuery $query, $moduleName)
Definition: ApiQueryAllUsers.php:29
ApiBase\dieDebug
static dieDebug( $method, $message)
Internal code errors should be reported with this method.
Definition: ApiBase.php:2188
SCHEMA_COMPAT_READ_OLD
const SCHEMA_COMPAT_READ_OLD
Definition: Defines.php:285
User\getGroupsWithPermission
static getGroupsWithPermission( $role)
Get all the groups who have a given permission.
Definition: User.php:5042
$wgActorTableSchemaMigrationStage
int $wgActorTableSchemaMigrationStage
Actor table schema migration stage.
Definition: DefaultSettings.php:8979