Extension:New User Email Notification/hooks/NewUserNotifBody
NewUserNotifBody | |
---|---|
Available from version 1.5.2 Create text for message body of notification email | |
Define function: | public static function onNewUserNotifBody( $callobj , $MessageBody , $SiteName , $recipient , $user ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"NewUserNotifBody": "MediaWiki\\Extension\\MyExtension\\Hooks::onNewUserNotifBody"
}
}
|
Called from: | File(s): NewUserNotif.class.php (extension NewUserNotif) |
Interface: | NewUserNotifBodyHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:NewUserNotifBody extensions.
Details
edit- $callobj: The object (Class::NewUserNotifier) from which the call was made ($this).
- $MessageBody: The string returned from this function that is the body message of the email to be delivered
- $SiteName: The name of the site from which this email is being delivered
- $recipient: The user name of the email recipient
- $user: The object (Class::User) of the user for which this message is being generated
Example
editA full example can be found in the example extension ExtendedParamsExample.php
included in Extension:NewUserNotif distribution.