Extension:New User Email Notification

The new user notification extension provides a customisable email notification of new account creations, which can be delivered to as many users as desired.

Skip to the Download

Readme
NEW USER EMAIL NOTIFICATION EXTENSION

Version 1.3 © 2006 Rob Church

This is free software licenced under the GNU General Public Licence. Please see http://www.gnu.org/copyleft/gpl.html for further details, including the full text and terms of the license.

Overview
1. Introduction 2. Installation requirements 3. Installing the extension 4. Editing the notification email 5. Further configuration 6. Change log 7. Feedback

1. Introduction
The new user email notification extension provides a clean and customisable means to send email messages to one or more registered users upon the creation of a user account. The behaviour of the extension can be controlled using configuration options within the LocalSettings.php file for MediaWiki.

2. Installation requirements
This extension requires MediaWiki 1.5.0 or later.

3. Installing the extension
To install the extension, place all extension files into a NewUserNotif directory within your MediaWiki extensions/ directory, then edit LocalSettings.php and add the following line

require_once( "{$IP}/extensions/NewUserNotif/NewUserNotif.php" );

4. Editing the notification email
When preparing the email message to be sent to each recipient, the extension relies upon two system messages. You will need to create these if you wish to customise them, as detailed below:

MediaWiki:Newusernotifsubj This file contains the subject line for the email. $1 is replaced with the wiki site name from $wgSitename.

MediaWiki:Newusernotifbody This file contains the body text for the email. $1 is replaced with the username of the recipient; $2 is replaced with the username of the new user account; $3 is replaced with the wiki site name from $wgSitename; $4 is replaced with the time and date of the account's creation.

5. Further configuration
The behaviour of the extension can be tweaked using three configuration variables. To override the defaults for these, set them in LocalSettings.php underneath the call to the extension file.

$wgNewUserNotifSender Email address of the sender of the email Defaults to the value of $wgPasswordSender

$wgNewUserNotifTargets Array containing the usernames or identifiers of those who should receive a notification email. Email will not be sent unless the recipient's	email address has been validated, where this is required in the site configuration. Defaults to the first user (usually the wiki's primary administrator) $wgNewUserNotifEmailTargets Array containing email addresses to which a notification should also be sent Defaults to no additional addresses

6. Change log
Version 1.1 17/02/2006	Added external email addresses feature Version 1.2 30/04/2006	Update to work with new hook format in MediaWiki 1.7 Fix date/time handling Version 1.3 01/05/2006	Rewrite for performance and code cleanliness Fix backwards-compatibility with MediaWiki 1.5 Support usernames as values for $wgNewUserNotifTargets

7. Feedback
All feedback, bug reports, etc. welcome via .

Download
The latest version of the extension can be obtained from MediaWiki's Subversion repository. You can access this using a standard Subversion client (see http://www.mediawiki.org/wiki/Download_from_SVN), or via the web-based viewer at http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/NewUserNotif.