Go to the documentation of this file.
39 parent::__construct( $query, $moduleName,
'oath' );
44 if ( $params[
'user'] ===
null ) {
45 $params[
'user'] = $this->
getUser()->getName();
51 if ( $user ===
false ) {
61 if ( !$user->isAnon() ) {
63 $authUser = $userRepo->findByUser( $user );
64 $data[
'enabled'] = $authUser &&
65 $authUser->getModule() !==
null &&
66 $authUser->getModule()->isEnabled( $authUser );
94 'action=query&meta=oath'
95 =>
'apihelp-query+oath-example-1',
96 'action=query&meta=oath&oathuser=Example'
97 =>
'apihelp-query+oath-example-2',
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.
checkUserRightsAny( $rights, $user=null)
Helper function for permission-denied errors.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
This abstract class implements many basic API functions, and is the base of all API classes.
This class represents the result of the API operations.
This is a base class for all Query modules.
const META_BC_BOOLS
Key for the 'BC bools' metadata item.
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.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...