Manual:Hooks/UnblockUserComplete

From MediaWiki.org
Jump to navigation Jump to search
UnblockUserComplete
Available from version 1.29.0 (Gerrit change 329725)
Occurs after the request to unblock an IP or user has been processed
Define function:
public static function onUnblockUserComplete( Block $block, User $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UnblockUserComplete": "MyExtensionHooks::onUnblockUserComplete"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UnblockUserComplete'][] = 'MyExtensionHooks::onUnblockUserComplete';
Called from:File(s): SpecialUnblock.php

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

Details[edit]

  • $block: the Block object that was saved
  • $user: the user who performed the unblock (not the one being unblocked)

See also[edit]