Your Moodle version

Authentication: Email-based self-registration with admin confirmation

auth_emailadmin
Maintained by Picture of Felipe Carasso Felipe Carasso
Provides email-based self-registration with admin confirmation instead of user confirmation.
821
486
20
Moodle 2.3, 2.4, 2.5, 2.6, 2.7

The confirmation email is sent to the main admin account's email address.

When the admin clicks on the confirmation link, a "welcome" email is sent to the user.

Note that the admin must use the confirmation link in the email for the user to receive the automatic notification. Approving the account from the user admin interface does not trigger it.

Email body is customizable within the language file.

Based on default email-based self-registration module.

You can customize the e-mail messages by editing the language file or using Moodle's language editor.

Screenshots

Screenshot #0
Screenshot #1

Contributors

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

Comments RSS

Show comments
  • Picture of Oleg Sizonov
    Sun, Sep 20, 2015, 11:14 PM
    Felipe, I totally satisfied with receiving confirmation emails by admins. Thank you a lot!
  • Picture of Daniel G
    Thu, Oct 29, 2015, 8:47 PM
    Hello, i have problem with this plugin. Problem with emails. User can register but he doesn't receive email from system. Admin received email and it is ok. But user doesn't. On screen after registration display "Tried to send you an email but failed!". On server where i installed moodle there is no SMTP service. I am using google mail. Should i configure something extra for this plugin ?
  • Picture of Alan Cherwinski
    Tue, Nov 17, 2015, 1:13 AM
    Hello - I am experiencing the same problem as Daniel G in October. The admin does get a message, but the user sees an error message on screen - "Tried to send you an email but failed!" - which suggests the user needs to try again. I have SMTP configured and running for the admin email. Is some helpful message meant to be displayed or emailed/sent to new user?
    Thanks
  • Picture of Felipe Carasso
    Tue, Nov 17, 2015, 1:38 AM
    Re: "Tried to send you an email but failed" (Daniel G and Alan Cherwinski)
    I can't help with that as I can't reproduce the problem. The best I can suggest is to ensure the server can send email messages to the concerned users, i.e. using command-line 'mail' from the same OS account that runs Moodle (could be www-data). If Moodle can't send email to a given address, most likely the server and/or the OS account itself can't.
  • Picture of Muhd Hanis Hanis
    Tue, Dec 15, 2015, 3:37 PM
    Hi, I want to ask about notification email for admin and user. How to modify user data that sent to admin email when user registered? The user data is too many, such as:

    id: 30
    auth: emailadmin
    confirmed: 0
    policyagreed: 0
    deleted: 0
    suspended: 0
    mnethostid: 1
    username:
    password:
    idnumber:
    firstname:
    lastname:
    email:
    emailstop:
    icq:
    skype:
    yahoo:
    aim:
    msn:
    phone1:
    phone2:
    institution:
    department:
    address:

    I just want to display first name, surname, email, password and custom user field only.

    One more question, after admin click on the the confirmation link, the notification email should be sent to user, but the user did not received the email, and sometimes it take few hours for user to received the email.

    Please help, thanks
  • Picture of Felipe Carasso
    Tue, Dec 15, 2015, 10:28 PM
    Hi Muhd,

    For now, you'd need to modify the plug-in's code (auth.php) to have your custom user info available to the message. I'll evaluate the possibility of making that available on the next version.

    Intermittent email delivery is not related to this plug-in, but to how Moodle, PHP and email servers in general deal with email messages.

    Best regards,
    Felipe
  • Picture of Muhd Hanis Hanis
    Tue, Dec 15, 2015, 11:33 PM
    Hi Felipe,
    I think these are the lines of codes that need modification:
    Lines 257:
    $data->userdata .= $dataname . ': ' . $datavalue . PHP_EOL;

    But, where should i find the list of user data..for example, i need to remove emailstop, icq, skype, yahoo, aim, msn field and etc.

    For the intermittent email delivery, can you suggest where should i look to configure so the user email will received instantly after admin approve?

    Thank you so much!
  • Picture of Felipe Carasso
    Wed, Dec 16, 2015, 1:41 PM
    I just released a new version where you can use specific user fields in the notification message. See default notification message for example.

    Best regards,
    Felipe
  • Picture of Muhd Hanis Hanis
    Wed, Dec 16, 2015, 4:05 PM
    I am using moodle 2.7, cannot install since it give me Validation failed! and displayed Error, Required version 2015051101. How do i solve this? Upgrading moodle version is not my option right now sad
  • Picture of Alan Cherwinski
    Tue, Jan 12, 2016, 5:34 AM
    Hello Felipe Carasso, I checked with my host provider and they tested the script and watched the mail server. The script appeared not to make any attempt to send an email to the new registrant. The email messages got delivered to the Moodle site administrators, but not the end user. The script is now displaying a very long trail of activity. I don't have debugging turned on. I can send you the 1234 lines of code that get kick out on screen during self registration. Thanks Moodle 2.9.2
  • Picture of Felipe Carasso
    Wed, Jan 13, 2016, 12:38 PM
    @Muhd: The latest version of this plug-in uses Moodle APIs that require that minimum version. It won't work on an older version. You can still try to use an older version of this plug-in that supports your Moodle version.

    @Alan: If you use the regular 'email self-registration', does the user get the notification? Maybe you customized the notification and made a mistake?
  • Picture of Alan Cherwinski
    Thu, Jan 14, 2016, 12:23 AM
    Thanks Muhd and Felipe,
    I am using the latest release of 2.9.4 and an up to date plug in. I have not modified or customized the any code. The registration results page displays over 1200 lines of code to the end user and still does not send a message to the self registering user. The email is going to the site administrator.
  • Picture of Alan Cherwinski
    Thu, Jan 14, 2016, 12:53 AM
    Thanks Muhd and Felipe, - I figured it out. The email debugging was turned on, the regular debugging was set to minimal - hence the display code. Also the self registration and sr with admin where enabled, but self registration was not enabled on the manage authentication page. Once all those were aligned and the debug code eliminated it worked like a charm. A bad combination of missteps lead to my confusion. Thanks again for your help and the great pluggin.
  • Picture of Alan Cherwinski
    Thu, Jan 14, 2016, 1:15 AM
    Could there be some other setting or configuration required or that I am missing? The confirmation link in the email is not working "Error 500". I've cut and pasted the url and can't see what is the issue. http://<>/auth/emailadmin/confirm.php?data=Yq5SePmiylh7erQ/alantest

    (FYI if a single site admin is selected in the pluggin setting the message is going to all)
  • Picture of Alan Cherwinski
    Thu, Jan 14, 2016, 2:33 AM
    My dedicated server admin checked the log files for the broken confirm code and reported back:
    Based on the logs in the Apache error log, the problem is with the script (Premature end of script headers: confirm.php):


    CT-19331-bash-4.1# tail -f /usr/local/apache/logs/error_log
    [Wed Jan 13 13:07:47 2016] [error] [client 209.50.226.20] Premature end of script headers: confirm.php
1 2 3 4 5
Please login to post comments