Jump to content

Extension:CheckUser/Hooks/CheckUserInsertLogEventRow

From mediawiki.org
CheckUserInsertLogEventRow
Available from version 1.40.0 (Gerrit change 876322)
Use this hook to modify the IP, XFF or other values on rows being inserted into the cu_log_event table
Define function:
public static function onCheckUserInsertLogEventRow( string &$ip, &$xff, array &$row, UserIdentity $user, int $id, ?RecentChange $rc ) { ... }
Attach hook:
$wgHooks['CheckUserInsertLogEventRow'][] = 'MyExtensionHooks::onCheckUserInsertLogEventRow';
Called from:File(s): CheckUser / src/Hooks.php
Function(s): insertIntoCuLogEventTable

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

Parameters

[edit]
  • &$ip - The IP address that will be stored in the row, which can be modified
  • &$xff - The XFF header that will be stored in the row, which can be modified
  • &$row - The row that will be stored in the cu_log_event after a few more modifications, which can be modified by code that hooks onto this hook
  • &$user - The user who made the request that caused the cu_log_event row.
  • $id - The ID of the log entry that is associated with this cu_log_event row.
  • $rc - Optional. The RecentChanges object associated with the request that caused the cu_log_event row insert (if one exists).