Manual:Hooks/SpreadAnyEditBlock

SpreadAnyEditBlock
Available from version 1.43.0 (Gerrit change 1075083)
Called before a retroactive autoblock is applied to a user.
Define function:
public static function onSpreadAnyEditBlock( $user, bool &$blockWasSpread ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpreadAnyEditBlock": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpreadAnyEditBlock"
	}
}
Called from: File(s): includes/user/User.php
Function(s): spreadAnyEditBlock
Interface: SpreadAnyEditBlockHook.php

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


Details

edit
  • $user: The User object associated with the request
  • &blockWasSpread: Whether any block was spread. Set this to true to indicate that a non-core block was spread. Used as the return value of User::spreadAnyEditBlock