Manual:Hooks/BlockIpComplete

From Linux Web Expert

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

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:BlockIpComplete extensions</tvar>.</translate>

Details

  • $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