Manual:Hooks/PrefsEmailAudit

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.
PrefsEmailAudit
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
called when user changes his email address
<translate> Define function:</translate>
public static function onPrefsEmailAudit( $user, $oldaddr, $newaddr ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"PrefsEmailAudit": "MediaWiki\\Extension\\MyExtension\\Hooks::onPrefsEmailAudit"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> SpecialChangeEmail.php
<translate> Interface:</translate> PrefsEmailAuditHook.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:PrefsEmailAudit extensions</tvar>.</translate>


Details

  • $user: User (object) changing his email address
  • $oldaddr: old email address (string)
  • $newaddr: new email address (string)

Note that the new email addess is not confirmed at this point.

See also