MediaWiki master
MediaWiki\User\Hook\PingLimiterHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onPingLimiter ( $user, $action, &$result, $incrBy)
 Use this hook to override the results of User::pingLimiter().
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 14 of file PingLimiterHook.php.

Member Function Documentation

◆ onPingLimiter()

MediaWiki\User\Hook\PingLimiterHook::onPingLimiter ( $user,
$action,
& $result,
$incrBy )

Use this hook to override the results of User::pingLimiter().

Since
1.35
Parameters
User$userUser performing the action
string$actionAction being performed
bool&$resultWhether or not the action should be prevented Change $result and return false to give a definitive answer, otherwise the built-in rate limiting checks are used, if enabled.
int$incrByAmount to increment counter by
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: