Manual:Hooks/isValidEmailAddr

From Linux Web Expert

isValidEmailAddr
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Override the result of Sanitizer::validateEmail().
<translate> Define function:</translate>
public static function onisValidEmailAddr( $addr, &$result ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"isValidEmailAddr": "MediaWiki\\Extension\\MyExtension\\Hooks::onisValidEmailAddr"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> Sanitizer.php
<translate> Interface:</translate> isValidEmailAddrHook.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:isValidEmailAddr extensions</tvar>.</translate>

Details

  • string $addr: The e-mail address entered by the user
  • bool/null &$result: Set this and return false to override the internal checks