Manual:Hooks/UserSetEmailAuthenticationTimestamp

From MediaWiki.org
Jump to navigation Jump to search
UserSetEmailAuthenticationTimestamp
Available from version 1.13.0
Called when setting the timestamp of email authentification.
Define function:
public static function onUserSetEmailAuthenticationTimestamp( $user, &$timestamp ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserSetEmailAuthenticationTimestamp": "MyExtensionHooks::onUserSetEmailAuthenticationTimestamp"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserSetEmailAuthenticationTimestamp'][] = 'MyExtensionHooks::onUserSetEmailAuthenticationTimestamp';
Called from:File(s): User.php

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

Details[edit]

  • $user: User object
  • &$timestamp: new timestamp, change this to override local email authentification timestamp

See also[edit]