Jump to content

Manual:Hooks/isValidEmailAddr

From mediawiki.org
isValidEmailAddr
Available from version 1.12.0
Override the result of Sanitizer::validateEmail().
Define function:
public static function onisValidEmailAddr( $addr, &$result ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"isValidEmailAddr": "MediaWiki\\Extension\\MyExtension\\Hooks::onisValidEmailAddr"
	}
}
Called from: File(s): Sanitizer.php
Interface: isValidEmailAddrHook.php

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

Details

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