Manual:Hooks/UserGetEmailAuthenticationTimestamp

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

In extension.json:

{
	"Hooks": {
		"UserGetEmailAuthenticationTimestamp": "MyExtensionHooks::onUserGetEmailAuthenticationTimestamp"
	}
}

For MediaWiki ≤1.25:

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

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

Details[edit]

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

See also[edit]