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

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


  • $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.