Manual:Hooks/AbortAutoblock - MediaWiki
AbortAutoblock | |
---|---|
Available from version 1.13.0 Allow extension to cancel an autoblock. | |
Define function: | public static function onAbortAutoblock( string $autoblockIP, DatabaseBlock $block ) { ... } |
Attach hook: | In extension.json:
{ "Hooks": { "AbortAutoblock": "MediaWiki\\Extension\\MyExtension\\Hooks::onAbortAutoblock" } } |
Called from: | File(s): block/DatabaseBlock.php Function(s): doAutoblock |
Interface: | AbortAutoblockHook.php |
$autoblockIP
: The IP that is going to be autoblocked.$block
: An instance ofMediaWiki\Block\DatabaseBlock
, representing the block from which the autoblock is coming.
- Return
false
to cancel an autoblock.