Jump to content
MediaWiki

Manual:Hooks/EmailUser

From mediawiki.org
Deprecated: This feature is deprecated and should no longer be used, however it is possibly still available for reasons of backwards compatibility . This feature was deprecated in version 1.41.0. See EmailUserSendEmail for an alternative way to use this feature.
EmailUser
Available from version 1.4.0
Occurs whenever the software receives a request to send an email from one user to another
Define function:
public static function onEmailUser( &$address, &$from, &$subject, &$text, &$error ) { ... }
Attach hook: In extension.json:
{
"Hooks":{
"EmailUser":"MediaWiki\\Extension\\MyExtension\\Hooks::onEmailUser"
}
}
Called from: File(s): specials/SpecialEmailUser.php
Interface: EmailUserHook.php

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


Details

[edit ]
  • $address: MailAddress of receiving user
  • $from: MailAddress of sending user
  • $subject: subject of the mail
  • $text: text of the mail
  • $error: error message returned by the hook

See also

[edit ]

AltStyle によって変換されたページ (->オリジナル) /