Extension:New User Email Notification/hooks/NewUserNotifSubject

Available from version 1.5.2
Create text for the subject line of the new user notification email
Define function:
public static function onNewUserNotifSubject( $callobj , $MessageBody , $SiteName , $recipient , $user ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"NewUserNotifSubject": "MyExtensionHooks::onNewUserNotifSubject"
Called from:File(s): NewUserNotif.class.php (extension NewUserNotif)

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


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


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

See AlsoEdit