31 parent::__construct(
$query, $moduleName,
'oath' );
36 if (
$params[
'user'] ===
null ) {
43 if ( $user ===
false ) {
53 if ( !$user->isAnon() ) {
55 ->findByUser( $user );
56 $data[
'enabled'] = $oathUser && $oathUser->getKey() !==
null;
84 'action=query&meta=oath'
85 =>
'apihelp-query+oath-example-1',
86 'action=query&meta=oath&oathuser=Example'
87 =>
'apihelp-query+oath-example-2',
checkUserRightsAny( $rights, $user=null)
Helper function for permission-denied errors.
dieWithError( $msg, $code=null, $data=null, $httpCode=null)
Abort execution with an error.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
getResult()
Get the result object.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
getModuleName()
Get the name of the module being executed by this instance.
This is a base class for all Query modules.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
getExamplesMessages()
Returns usage examples for this module.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
__construct( $query, $moduleName)
isInternal()
Indicates whether this module is "internal" Internal API modules are not (yet) intended for 3rd party...
const META_BC_BOOLS
Key for the 'BC bools' metadata item.
static getOATHUserRepository()
Get the singleton OATH user repository.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
null for the local 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
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)