Jump to content


From mediawiki.org
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onInvalidateEmailComplete"
Called from: File(s): User.php
Interface: InvalidateEmailCompleteHook.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