Open main menu

Manual:Hooks/LoggableUserIPData

LoggableUserIPData
Available from version 1.19.0
Removed in version 1.22.0
Called when IP data for a user action can be logged by extensions like Extension:CheckUser.
Define function:
public static function onLoggableUserIPData( IContextSource $context, array $data ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"LoggableUserIPData": "MyExtensionHooks::onLoggableUserIPData"
	}
}

For MediaWiki ≤1.25:

$wgHooks['LoggableUserIPData'][] = 'MyExtensionHooks::onLoggableUserIPData';
Called from:File(s):

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

DetailsEdit

Called when IP data for a user action can be logged by extensions like Extension:CheckUser.

This is intended for when users do things that do not already create edits or log entries.

$context: The context the of the action, which includes the user and request

$data: Associative array of data for handlers to record. It must include values for:

  • 'namespace' Integer namespace for target title (NS_SPECIAL is allowed)
  • 'title' Database key string for target title (empty string if not applicable)
  • 'pageid' Integer Page id for target title (zero if not applicable)
  • 'action' Wikitext string in the same format as an edit summary
  • 'comment' Wikitext string in the same format as an edit summary
  • 'timestamp' Timestamp when the action occurred

$article: the article (object) being updated or deleted