General plugins (Local): Moodle welcome

Maintained by Picture of Bas Brands Bas Brands
Sends a welcome message to new users, sends a notification to a moderator of the new user creation
855 sites
82 fans


This plugin sends one email message to users that are new in Moodle and one email to a moderator.

This will work to all standard moodle authentication systems:

  • manually created users
  • users that signed up
  • users authentication through LDAP
  • all other standard authentication systems

Configuration can be done using:

Site administration->Plugins->Local plugins->Moodle welcome

Configurable fields are:

enable / disable welcome messages to users
enable / disable welcome messages to moderators

message send to user
message send to moderator

message subject for user
message subject for moderator

send from firstname
send from lastname
send from email address

moderator email address


Download and install in your /local folder in moodle's wwwroot

Run Moodle notifications,

Configure your email messages / moderators etc


Screenshot #0


Picture of Bas Brands
Bas Brands (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Picture of Bas Brands
    Thu, 4 Jun 2015, 2:32 PM
    Hi Adolfo,

    I have not tried the Joomdle auth plugin yet. This plugin hooks into Moodle's event triggers that are fired when a new user is created. Auth plugins should fire this event. If the Joomdle auth plugin does not have this trigger no email will be send.
  • Picture of Adolfo Franco
    Mon, 8 Jun 2015, 11:44 AM
    Hi Bas Brands,
    Thank you for the feedback. smile
    Then I have to check with the Joomdle people.
  • Picture of Mykl Belfatto
    Mon, 8 Jun 2015, 2:45 PM
    So, if I understand your post above. In order to set the Password at the time the email is sent, the following lines of code need to be added after the value array is loaded in the latest iteration as well:

    if (strpos($message_user, 'newpasswordtext') !== FALSE){
    $fields[] = 'newpasswordtext';
    $newpassword = generate_password();
    update_internal_user_password($user, $newpassword, FALSE);
    $values[] = $newpassword;;
  • Picture of Bas Brands
    Mon, 8 Jun 2015, 8:27 PM
    Hi Mykl,

    That looks like it could work yes. I will not add the code to the welcome plugin, if an admin uploads a csv with passwords they will be reset when using this bit of code. It would be okay if the admin knows about this but if not it could confuse users.
    In any case thanks for posting this!
  • Picture of Mykl Belfatto
    Tue, 9 Jun 2015, 1:35 AM
    To incorporate the Generation of Password, why not add the logic to check if the uploaded password is something like "GENPASSxxxxxxxxx" in which case, your plugin would then generate a new password and protect access until that time.
  • Picture of Mykl Belfatto
    Tue, 9 Jun 2015, 1:37 AM
    Sorry, forgot to ask, do I need to add something to the CRON jobs, or is that done automatically?
  • Picture of Adolfo Franco
    Tue, 9 Jun 2015, 8:47 PM
    Hi again Bas Brands,

    I talked with Antonio Duran from Joomdle (in forum) and he said that "Joomdle should be triggering event as it calls create_user_record(), which triggers the event."
    Any thoughts?
    I guess my server and moodle configs are ok becuase I have tested the Welcome Moodle plugin with manual accounts and the emails were sent just fine!
    I'm contacting you guys because both plugins are great and together would be the perfect solution for my needs.
    Thanks for your help smile
  • Picture of Bas Brands
    Wed, 10 Jun 2015, 12:42 AM
    @mykl : no the plugin is triggered by the Moodle event system, not cron. I like the idea of the GENPASS suggestion. I will look into it as soon as I have some spare time.
  • Picture of Bas Brands
    Wed, 10 Jun 2015, 12:42 AM
    @adolfo: Okay so maybe it is an issue with Moodle's new event system. What version of Moodle are you using?
  • Picture of Mykl Belfatto
    Wed, 10 Jun 2015, 1:37 AM
    Thanks Bas, by the way...Great Plugin!!! Very useful and easy to implement.
  • Picture of Adolfo Franco
    Thu, 11 Jun 2015, 10:12 AM
    @Bas: I use 2.9. After some tests, I found that when I created a user manually with joomdle auth selected, the email was indeed sent.
    But good news everyone! Antonio Duran from Joomdle has posted (at Joomdle forum) a tiny patch to his Joomdle auth plugin and the Moodle Welcome email is also being sent to new users added in bulk (automatically) to Moodle by Joomla/Joomdle.
    So, I believe there was nothing wrong with neither plugin, it was actually a sort of incompatibility issue.
    Anyway, both plugins working together saves our small team a precious time.
    Thanks again for your great plugin!
  • Picture of Mykl Belfatto
    Sat, 20 Jun 2015, 9:42 PM
    Hey Bas, quick question....we want to send 2 emails, one to the moderator, and oneto the sysadmin. can i add multiple email addresses in the moderator email field? cheers.
  • Picture of Bas Brands
    Sat, 20 Jun 2015, 9:55 PM
    Hi Mykl,

    I am sorry, it only supports one admin contact. Maybe you could setup an email account that is forwarded to multiple users?
  • Picture of Richard Osborne
    Wed, 24 Jun 2015, 3:08 AM
    Hi. This is a great plugin, exactly what I needed. The only problem is I can't make it send to oauth logins. I've tried with the plugins: oauth2, lenauth and elcentra. It works perfectly with email based self registration. Can you help me?
  • Picture of Peter Ngigi
    Thu, 6 Aug 2015, 5:40 AM
    I have the same problem. Someone help.
Please login to post comments