Open main menu


< Manual:Hooks
Available from version 1.18.0 (r92223)
Called before a retroactive autoblock is applied to a user.
Define function:
public static function onPerformRetroactiveAutoblock( $block, &$blockIds ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"PerformRetroactiveAutoblock": "MyExtensionHooks::onPerformRetroactiveAutoblock"

For MediaWiki ≤1.25:

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

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


  • $block: Block object (which is set to be autoblocking)
  • &$blockIds: Array of block IDs of the autoblock