MediaWiki master
MediaWiki\Block\Hook\GetUserBlockHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onGetUserBlock ( $user, $ip, &$block)
 Use this hook to modify the block found by the block manager.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 15 of file GetUserBlockHook.php.

Member Function Documentation

◆ onGetUserBlock()

MediaWiki\Block\Hook\GetUserBlockHook::onGetUserBlock ( $user,
$ip,
& $block )

Use this hook to modify the block found by the block manager.

This may be a single block or a composite block made from multiple blocks; the original blocks can be seen using CompositeBlock::getOriginalBlocks().

Since
1.35
Parameters
User$userUser targeted by the block
string | null$ipIP of the current request if $user is the current user and they're not exempted from IP blocks. Null otherwise.
AbstractBlock | null&$blockUser's block, or null if none was found
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


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