Available from version ??? (Gerrit change 80152)
Allows altering the variables generated for a specific user
Define function:
public static function onAbuseFilter_generateUserVars( MediaWiki\Extension\AbuseFilter\Variables\VariableHolder $vars, User $user, ?RecentChange $rc ) { ... }
Attach hook:
$wgHooks['AbuseFilter-generateUserVars'][] = 'MyExtensionHooks::onAbuseFilter_generateUserVars';
Called from:File(s): AbuseFilter / VariableGenerator.php

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:AbuseFilter-generateUserVars extensions.

Arguments edit

  • $vars AbuseFilterVariableHolder object to add vars to
  • $user User object
  • $rc If the variables should be generated for an RC entry, this is the entry. Null if it's for the current action being filtered.