Manual:Hooks/AbortAutoblock

From MediaWiki.org
Jump to navigation Jump to search
AbortAutoblock
Available from version 1.13.0
Allow extension to cancel an autoblock.
Define function:
public static function onAbortAutoblock( $autoblockip, $block ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"AbortAutoblock": "MyExtensionHooks::onAbortAutoblock"
	}
}

For MediaWiki ≤1.25:

$wgHooks['AbortAutoblock'][] = 'MyExtensionHooks::onAbortAutoblock';
Called from:File(s): Block.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:AbortAutoblock extensions.

Details[edit]

  • $autoblockip: The IP going to be autoblocked.
  • $block: The block from which the autoblock is coming.

Notes[edit]

  • Return "false" to cancel an autoblock.