Manual:Hooks/GetBlockedStatus

From MediaWiki.org
Jump to navigation Jump to search
GetBlockedStatus
Available from version 1.6.0
Fired after the user's getBlockStatus is set.
Define function:
public static function onGetBlockedStatus( $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"GetBlockedStatus": "MyExtensionHooks::onGetBlockedStatus"
	}
}

For MediaWiki ≤1.25:

$wgHooks['GetBlockedStatus'][] = 'MyExtensionHooks::onGetBlockedStatus';
Called from: File(s): User.php
Function(s): User::getBlockedStatus()

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

Details[edit]

$user - The user whose block status is being checked.