Jump to content

Manual:Hooks/BlockIpComplete

From mediawiki.org
BlockIpComplete
Available from version 1.4.0
Occurs after the request to block an IP or user has been processed
Define function:
public static function onBlockIpComplete( DatabaseBlock $block, User $user, ?DatabaseBlock $priorBlock ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"BlockIpComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onBlockIpComplete"
	}
}
Called from: File(s): specials/SpecialBlock.php
Interface: BlockIpCompleteHook.php

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

Details

[edit]
  • $block: the DatabaseBlock object that was saved
  • $user: the user who did the block (not the one being blocked)
  • $priorBlock: the DatabaseBlock object for the prior block or null if there was none

See also

[edit]