Manual:Hooks/isValidEmailAddr
Appearance
| 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): Parser/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