Manual:Hooks/ChangeAuthenticationDataAudit

From MediaWiki.org
Jump to navigation Jump to search
ChangeAuthenticationDataAudit
Available from version 1.27.0
called when user changes authentication data
Define function:
public static function onChangeAuthenticationDataAudit( $req, $status ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ChangeAuthenticationDataAudit": "MyExtensionHooks::onChangeAuthenticationDataAudit"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ChangeAuthenticationDataAudit'][] = 'MyExtensionHooks::onChangeAuthenticationDataAudit';
Called from:File(s): specialpage/AuthManagerSpecialPage.php

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

Details[edit]

  • $req: a \MediaWiki\Auth\AuthenticationRequest object
  • $status: a StatusValue with the result

Before AuthManager, the PrefsPasswordAuditTemplate:Enlink/list1 hook was used.