Extension:New User Email Notification/hooks/NewUserNotifBody

From MediaWiki.org
Jump to: navigation, search
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:
$wgHooks['NewUserNotifBody'][] = 'MyExtensionHooks::onNewUserNotifBody';
Called from: NewUserNotif.class.php (extension NewUserNotif)

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

[edit] Details

  • $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

[edit] Example

A full example can be found in the example extension ExtendedParamsExample.php included in Extension:NewUserNotif distribution.

[edit] See Also

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox