Jump to navigation Jump to search
Available from version 1.16.0
Called after a user's email has been invalidated successfully.
Define function:
public static function onInvalidateEmailComplete( $user ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"InvalidateEmailComplete": "MyExtensionHooks::onInvalidateEmailComplete"

For MediaWiki ≤1.25:

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

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


  • $user: user (object) whose email is being invalidated

Called both when a user sets a new email address (so the old one becomes invalid) and when a user refuses the confirm that address (by clicking the cancel link in the confirmation email).

At the point this hook is called, the passed User object's email-related fields have been unset but the changes have not been saved to the database/cache yet.

See also[edit]