Manual:Hooks/UserIsBlockedGlobally
From Linux Web Expert
UserIsBlockedGlobally | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Runs before User::mBlockedGlobally is set; can be used to change the blocked status of an IP address or a user | |
<translate> Define function:</translate> | public static function onUserIsBlockedGlobally( &$user, $ip, &$blocked, &$block ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"UserIsBlockedGlobally": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserIsBlockedGlobally"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> User.php |
<translate> Interface:</translate> | UserIsBlockedGloballyHook.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:UserIsBlockedGlobally extensions</tvar>.</translate>
Details
- &$user: User object
- $ip: IP address of current user
- &$blocked: blocked flag