MediaWiki master
MediaWiki\User\Hook\UserRequirementsConditionHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onUserRequirementsCondition ( $type, array $args, UserIdentity $user, bool $isPerformingRequest, ?bool &$result)
 Use this hook to check user requirements condition for a user.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "UserRequirementsCondition" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file UserRequirementsConditionHook.php.

Member Function Documentation

◆ onUserRequirementsCondition()

MediaWiki\User\Hook\UserRequirementsConditionHook::onUserRequirementsCondition ( $type,
array $args,
UserIdentity $user,
bool $isPerformingRequest,
?bool & $result )

Use this hook to check user requirements condition for a user.

Since
1.46
Parameters
string | int$typeThe evaluated condition
array$argsArguments to the condition
UserIdentity$userThe user who's subject to the condition check. This user may or may not be the one who is performing the current request. Furthermore, they may or may not be from the local wiki.
bool$isPerformingRequestTrue if $user is the one performing the current request. If false, the hook handler should avoid comparing the user against any session- or request-related data, but should still set the $result to either true or false, to indicate that the condition was recognized.
null | bool&$resultResult of checking the condition

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: