Extension:New User Email Notification

The New User Email Notification extension sends a customisable email to specified recipients when a new user account is created. The extension can send to multiple users, and additional email addresses, and is useful for keeping track of account creation on a small wiki.

Requirements
The New User Email Notification extension is available for MediaWiki 1.5.0 and later.


 * For MediaWiki 1.8.0 and above, use the trunk version
 * For the MediaWiki 1.5, 1.6 and 1.7 series, use the branched version

Installation

 * 1) Place extension files into a "NewUserNotif" directory in your MediaWiki "extensions" directory
 * 2) Add the line   to LocalSettings.php

Installation can be verified through the Special:Version page on the wiki.

Configuration
The behaviour of the extension, including notification recipients, is managed using the configuration variables below:

$wgNewUserNotifTargets : Array containing the usernames or identifiers of those who should receive a notification email; defaults to the first user (usually the wiki's primary administrator) $wgNewUserNotifEmailTargets : Array containing email addresses to which a notification should also be sent

$wgNewUserNotifSender : Email address of the sender of the email; defaults to the value of $wgPasswordSender

Customising the notification email
The subject and text of the notification email sent to each recipient can be customised using two messages:

MediaWiki:Newusernotifsubj
Subject line

MediaWiki:Newusernotifbody
Body text

Further customisation
Additional fields can be added to the notification e-mail, such as the IP address the request came from. To do this, edit NewUserNotif.class.php and in the makeMessage function near the end of the file, add extra parameters to the wfMsgForContent function (for example, adding $_SERVER['REMOTE_ADDR'] will give you the new user's IP address.) The parameters continue after the default ones, so the first parameter you add will become $5.

You can then either edit MediaWiki:Newusernotifbody to make use of the new parameter (e.g. add "\n\nThe request came from $5.") or alternatively if you haven't customised the message you can edit NewUserNotif.i18n.php and make the change there to avoid creating a new wiki page (e.g. if your wiki is in English, change the 'en' array.)