MediaWiki REL1_35
|
Stable to implement. More...
Public Member Functions | |
onUserCan ( $title, $user, $action, &$result) | |
Use this hook to interrupt or advise the "user can do X to Y article" check. | |
Stable to implement.
Definition at line 12 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.