Manual:Hooks/UserIsBlockedFrom
From Linux Web Expert
UserIsBlockedFrom | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Check if a user is blocked from a specific page (for specific block exemptions). | |
<translate> Define function:</translate> | public static function onUserIsBlockedFrom( $user, $title, &$blocked, &$allowUsertalk ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"UserIsBlockedFrom": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserIsBlockedFrom"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> Permissions/PermissionManager.php |
<translate> Interface:</translate> | UserIsBlockedFromHook.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:UserIsBlockedFrom extensions</tvar>.</translate>
Details
- $user: User in question
- $title: Title of the page in question
- &$blocked: Out-param, whether or not the user is blocked from that page.
- &$allowUsertalk: If the user is blocked, whether or not the block allows users to edit their own user talk pages.