MediaWiki master
MediaWiki\User\Hook\ReadPrivateUserRequirementsConditionHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onReadPrivateUserRequirementsCondition (UserIdentity $performer, UserIdentity $target, array $conditions)
 This hook is called when the value of private user requirement conditions is revealed to another user.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 18 of file ReadPrivateUserRequirementsConditionHook.php.

Member Function Documentation

◆ onReadPrivateUserRequirementsCondition()

MediaWiki\User\Hook\ReadPrivateUserRequirementsConditionHook::onReadPrivateUserRequirementsCondition ( UserIdentity $performer,
UserIdentity $target,
array $conditions )

This hook is called when the value of private user requirement conditions is revealed to another user.

It allows the extensions to perform logging if they wish to record when some condition-related data was given to user.

This usually happens when a performer submits Special:UserRights and tries to assign another user to a group, which is restricted ({

See also
$wgRestrictedGroups}) and uses a private condition ({
$wgUserRequirementsPrivateConditions}). The values for conditions are not shown directly, but knowledge if user can or cannot be added to a group may imply what is the actual value for such condition.

This hook is called regardless of whether the action involving checking conditions failed or succeeded. For instance, in case of Special:UserRights, it may happen that a public 'rights' log is added and another extension-managed log entry is created for the same action.

Since
1.46
Parameters
UserIdentity$performerThe user who performed the action revealing the condition value
UserIdentity$targetThe user for whom the condition was evaluated
list<mixed>$conditions A list of values, referring to private conditions that were evaluated. The values will correspond to constants such as APCOND_BLOCKED

Implemented in MediaWiki\HookContainer\HookRunner.


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