MediaWiki master
MediaWiki\Hook\GetSecurityLogContextHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onGetSecurityLogContext (array $info, array &$context)
 This hook is called from WebRequest::getSecurityLogContext() to collect information about the request that's worth logging for log events which are relevant for security or anti-abuse purposes (login, credentials changes etc).
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 12 of file GetSecurityLogContextHook.php.

Member Function Documentation

◆ onGetSecurityLogContext()

MediaWiki\Hook\GetSecurityLogContextHook::onGetSecurityLogContext ( array $info,
array & $context )

This hook is called from WebRequest::getSecurityLogContext() to collect information about the request that's worth logging for log events which are relevant for security or anti-abuse purposes (login, credentials changes etc).

Parameters
array$infoInformation array with the following fields:
  • request: the WebRequest object
  • user: a UserIdentity object, or null. This is the user the log event is associated with (not necessarily the session user; not necessarily a locally existing user). The username is never an IP address.
array&$contextThe PSR-3 log context.
Returns
void This hook must not abort, it must return no value
Since
1.45
See also
WebRequest::getSecurityLogContext()

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: