MediaWiki REL1_40
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
Public Member Functions | |
onUserCan ( $title, $user, $action, &$result) | |
Use this hook to interrupt or advise the "user can do X to Y article" check. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "userCan" to register handlers implementing this interface.
Definition at line 15 of file UserCanHook.php.
MediaWiki\Permissions\Hook\UserCanHook::onUserCan | ( | $title, | |
$user, | |||
$action, | |||
& | $result ) |
Use this hook to interrupt or advise the "user can do X to Y article" check.
If you want to display an error message, try getUserPermissionsErrors.
Title | $title | Title being checked against |
User | $user | Current user |
string | $action | Action being checked |
string | &$result | Pointer to result returned if hook returns false. If null is returned, userCan checks are continued by internal code. |
Implemented in MediaWiki\HookContainer\HookRunner.