MediaWiki master
MediaWiki\Hook\BlockIpHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onBlockIp ( $block, $user, &$reason)
 This hook is called before an IP address or user is blocked.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 15 of file BlockIpHook.php.

Member Function Documentation

◆ onBlockIp()

MediaWiki\Hook\BlockIpHook::onBlockIp (   $block,
  $user,
$reason 
)

This hook is called before an IP address or user is blocked.

Since
1.35
Parameters
DatabaseBlock$blockthe Block object about to be saved
User$userthe user doing the block (not the one being blocked)
array&$reasonif the hook is aborted, the error message to be returned in an array
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: