Manual:Hooks/InvalidateEmailComplete

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
InvalidateEmailComplete
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Called after a user's email has been invalidated successfully.
<translate> Define function:</translate>
public static function onInvalidateEmailComplete( $user ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"InvalidateEmailComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onInvalidateEmailComplete"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> User.php
<translate> Interface:</translate> InvalidateEmailCompleteHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:InvalidateEmailComplete extensions</tvar>.</translate>


Details

  • $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