Manual:Hooks/UnblockUser
From Linux Web Expert
UnblockUser | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 329725)</tvar></translate> Occurs whenever the software receives a request to unblock an IP address or user | |
<translate> Define function:</translate> | public static function onUnblockUser( &$block, &$user, &$reason ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"UnblockUser": "MediaWiki\\Extension\\MyExtension\\Hooks::onUnblockUser"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> SpecialUnblock.php |
<translate> Interface:</translate> | UnblockUserHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:UnblockUser extensions</tvar>.</translate>
Details
This occurs before an IP address or user is unblocked.
- $block: the Block object about to be saved
- $user: the user doing the unblock (not the one being unblocked)
- &$reason: if the hook is aborted, the error message in an array, by default:
array( 'hookaborted' )