Go to the documentation of this file.
49 if ( !
$user->isAllowed(
'block' ) ) {
52 # bug 15810: blocked admins should have limited access here
53 if (
$user->isBlocked() ) {
55 if ( $status !==
true ) {
61 'Target' => is_null(
$params[
'id'] ) ?
$params[
'user'] :
"#{$params['id']}",
70 $res[
'id'] = $block->getId();
73 $res[
'userid'] = $target instanceof
User ? $target->
getId() : 0;
101 'id' =>
"ID of the block you want to unblock (obtained through list=blocks). " .
102 "Cannot be used together with {$p}user",
103 'user' =>
"Username, IP address or IP range you want to unblock. " .
104 "Cannot be used together with {$p}id",
105 'token' =>
"An unblock token previously obtained through prop=info",
106 'reason' =>
'Reason for unblock',
134 return 'Unblock a user.';
138 return array_merge( parent::getPossibleErrors(),
array(
139 array(
'unblock-notarget' ),
140 array(
'unblock-idanduser' ),
141 array(
'cantunblock' ),
142 array(
'ipbblocked' ),
143 array(
'ipbnounblockself' ),
157 'api.php?action=unblock&id=105',
158 'api.php?action=unblock&user=Bob&reason=Sorry%20Bob'
163 return 'https://www.mediawiki.org/wiki/API:Block';
static processUnblock(array $data, IContextSource $context)
Process the form.
getContext()
Get the RequestContext object.
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
getId()
Get the user's ID.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
dieUsageMsg( $error)
Output the error message related to a certain array.
getResult()
Get the result object.
static newFromTarget( $specificTarget, $vagueTarget=null, $fromMaster=false)
Given a target and the target's type, get an existing Block object if possible.
getDescription()
Returns the description string for this module.
isWriteMode()
Indicates whether this module requires write mode.
getUser()
Get the User object.
This abstract class implements many basic API functions, and is the base of all API classes.
execute()
Unblocks the specified user or provides the reason the unblock failed.
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
API module that facilitates the unblocking of users.
getPossibleErrors()
Returns a list of all possible errors returned by the module.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
getParamDescription()
Returns an array of parameter descriptions.
getExamples()
Returns usage examples for this module.
getTokenSalt()
Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the mo...
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
mustBePosted()
Indicates whether this module must be called with a POST request.
needsToken()
Returns whether this module requires a token to execute It is used to show possible errors in action=...
getModuleName()
Get the name of the module being executed by this instance.
static checkUnblockSelf( $user, User $performer)
bug 15810: blocked admins should not be able to block/unblock others, and probably shouldn't be able ...
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
getName()
Get the user name, or the IP of an anonymous user.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account incomplete not yet checked for validity & $retval