Manual:Hooks/UserIsBlockedGlobally

Category:MediaWiki hooks#UserIsBlockedGlobally Category:Hooks added in MediaWiki 1.14.0#UserIsBlockedGlobally
UserIsBlockedGlobally
Available from version 1.14.0
Runs before User::mBlockedGlobally is set; can be used to change the blocked status of an IP address or a user
Define function:
public static function onUserIsBlockedGlobally( &$user, $ip, &$blocked, &$block ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserIsBlockedGlobally": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserIsBlockedGlobally"
	}
}
Called from: File(s): User.phpCategory:MediaWiki hooks included in User.php#UserIsBlockedGlobally
Interface: UserIsBlockedGloballyHook.php

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

Details

  • &$user: User object
  • $ip: IP address of current user
  • &$blocked: blocked flag
Category:Hooks added in MediaWiki 1.14.0 Category:MediaWiki hooks Category:MediaWiki hooks included in User.php