| getUserPermissionsErrors | |
|---|---|
| Available fromversion 1.12.0 Add a permissions error when permissions errors are checked for. | |
| Define function: | publicstaticfunctionongetUserPermissionsErrors($title,$user,$action,&$result){...} |
| Attach hook: | Inextension.json:{"Hooks":{"getUserPermissionsErrors":"MediaWiki\\Extension\\MyExtension\\Hooks::ongetUserPermissionsErrors"}} |
| Called from: | File(s):Permissions/PermissionManager.php |
| Interface: | getUserPermissionsErrorsHook.php |
For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:getUserPermissionsErrors extensions.
Both hooks are typically run when checking for proper permissions inTitle.php.When it is desirable to skip potentially expensive cascading permission checks, only getUserPermissionsErrors is run.This behavior is suitable for nonessential UI controls in common cases, butnot for functional access control.This behavior may provide false positives, but should never provide a false negative.