Notify site administrators about new Email Signups

General plugins (Local) ::: local_notifyemailsignup
Maintained by Iñaki Arenaza
This plugin sends an email notification message to the 'Support email' address every time a new Moodle user account is created via the 'Email signup' authentication plugin. The notification message contains some essential details about the account just created (email address, full name and user account name). The email is sent when the user signs up, not when the user account is confirmed. So the plugin will notify even about accounts that may never be confirmed.

Notify site administrators about new Email Signups 1.0.2

Moodle 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9
Released: Thursday, 31 August 2017, 5:50 PM

What this Moodle plugin is for

This Moodle plugin sends an email notification message to the 'Support email' address every time a new Moodle user account is created via the 'Email signup' authentication plugin. The notification message contains some essential details about the account just created (email address, full name and user account name).

The email is sent when the user signs up, not when the user account is confirmed. So the plugin will notify even about accounts that may never be confirmed.

Supported Moodle Versions

The plugin currently works with Moodle 2.7 or later versions.

Installation

This is a standard Moodle Local Plugin, so you can follow the standard installation instructions for Moodle Plugins at https://docs.moodle.org/en/Installing_plugins . Note that if you install this plugin manually at the server, you need to install it inside the 'local' directory at the top of the moodle installation directory.

Configuration

The only configuration used by the plugin is the Support Contact settings. It uses the 'Support name' and 'Support email' settings as the recipient of the email notification messages it sends.

You can customise the content/wording of the notification messages by editing the language strings of the plugin, e.g., through the built-in 'Language customisation' mechanism. All the user table fields and custom profile fields are available in the $a object as {$a->signup_valuename}. The syntax of valuename depends on whether the value comes from the user table fields or from the custom profile fields (this is due to an unfortunate limitation of the Moodle language strings interpolation syntax).

  • For the user table fields, the syntax for valuename is user_fieldname, where fieldname is one of user table fields like id, username, auth, firstname, lastname, etc. The password field does not contain the actual password, for security reasons.
  • For the custom profile fields, the syntax for valuename is profile_profileshortname, where profileshortname is the shortname of the custom profile field.

The following examples may help understand the syntax. Assuming we have two custom profile fields, whose short names are signupcategory and referralcode, we could use the following values in the notification message language string (only some of the user table fields are shown for brevity purposes):

  • {$a->signup_user_id}: this will be substituted by the account id.
  • {$a->signup_user_username}: this will be substituted by the account username.
  • {$a->signup_user_lastname}: this will be substituted by the account lastname.
  • {$a->signup_user_city}: this will be substituted by the account city.
  • {$a->signup_profile_signupcategory}: this will be substituted by the content of the custom profile field whose shortname is signupcategory.
  • {$a->signup_profile_referralcode}: this will be substituted by the content of the custom profile field whose shortname is referralcode.

Version information

Version build number
2017083101
Version release name
1.0.2
Maturity
Stable version
MD5 Sum
234509a8b89298ba687c8b6c1c4b0efd
Supported software
Moodle 2.7, Moodle 2.8, Moodle 2.9, Moodle 3.0, Moodle 3.1, Moodle 3.2, Moodle 3.3, Moodle 3.4, Moodle 3.5, Moodle 3.6, Moodle 3.7, Moodle 3.8, Moodle 3.9

Version control information

Version control system (VCS)
GIT
VCS repository URL

Default installation instructions for plugins of the type General plugins (Local)

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder in the "local" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation.