Manual:Hooks/UserIsEveryoneAllowed

From MediaWiki.org
Jump to navigation Jump to search
UserIsEveryoneAllowed
Available from version 1.22.0 (Gerrit change 73418)
Check if all users are allowed some user right; return false if a UserGetRights hook might remove the named right.
Define function:
public static function onUserIsEveryoneAllowed( string $right ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserIsEveryoneAllowed": "MyExtensionHooks::onUserIsEveryoneAllowed"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserIsEveryoneAllowed'][] = 'MyExtensionHooks::onUserIsEveryoneAllowed';
Called from:File(s): Permissions/PermissionManager.php
Function(s): isEveryoneAllowed

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

Details[edit]

  • $right: The user right being checked