< Manual:Hooks
UserIsBlockedFrom
Available from version 1.16.0
Check if a user is blocked from a specific page (for specific block exemptions).
Define function:
public static function onUserIsBlockedFrom( $user, $title, &$blocked, &$allowUsertalk ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserIsBlockedFrom": "MyExtensionHooks::onUserIsBlockedFrom"
	}
}
Called from: File(s): Permissions/PermissionManager.php
Interface: UserIsBlockedFromHook.php

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

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.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.