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.
596 sites
590 downloads
45 fans

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.

Please read the INSTALL file carefully

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 Ziyad Muslat
    Thu, 4 Aug 2016, 12:28 AM
    Hi Felipe,
    I just installed the plugin in my moodle 3.1.1. The plugin works great. However, when a new user registers for an account. A debugging message shows up as follows (after clicking "Create my account") :

    Events API using $handlers array has been deprecated in favour of Events 2 API, please use it instead.

    line 3938 of /lib/deprecatedlib.php: call to debugging()
    line 4216 of /lib/deprecatedlib.php: call to events_dispatch()
    line 809 of /lib/classes/event/base.php: call to events_trigger_legacy()
    line 99 of /auth/emailadmin/auth.php: call to core\event\base->trigger()
    line 86 of /login/signup.php: call to auth_plugin_emailadmin->user_signup()

    As I said, the registeration process goes through, but I'm not sure what do I need to do to comply with this message.
  • Picture of Felipe Carasso
    Thu, 4 Aug 2016, 8:26 AM
    Hi Ziyad,

    For now, you can modify/disable error logging to have that hidden through Site Administration -> Development -> Debugging, have 'Display debug messages' unchecked and maybe change 'Debug messages' to something less verbose like 'Errors'.

    I'll look into it once I'm back home from my volunteer work for the Olympics.

    Best regards,
    Felipe
  • Picture of Antonio Rinaldi
    Wed, 23 Nov 2016, 6:01 AM
    Hi Felipe, you helped me in installing your plugin.
    Now I have another problem.
    I tried to register as a new user. When confirming my registration, I got: Tried to send you an email but failed!
    In the meantime I received an email message whose first lines are:

    No admin found based on notification strategy. Please check auth_emailadmin configuration.

    Hi Moodle Admin,

    A new account has been requested at '...' with the following data:

    Any specific user field example:
    user->lastname: fantasyname

    etcetera

    Have you any idea?

    Notice that my server acts as relay so I don't need to specify smtp server to send messages.

    Thank you.
  • Picture of Felipe Carasso
    Wed, 23 Nov 2016, 1:09 PM
    Hi Antonio,

    Your configuration seems to point to at least one admin user which may not have a proper email address. You can try to specify a different user in the configuration or check that your admin users have valid email addresses.

    Best regards,
    Felipe
  • Picture of Antonio Rinaldi
    Thu, 24 Nov 2016, 3:01 PM
    It's very strange because there are two administrators and both of them have valid email addresses. Anyway you are right because changing the notification strategy to all administrators the error disappeared.
    Even if the problem is still here.
    Now when I complete a new registration (step repeated many times) I receive the message:
    Your account has been registered and is pending confirmation by the administrator. You should expect to either receive a confirmation or to be contacted for further clarification.
    but I do not receive any message. In other words: no error, all seems working fine but no message at all.
  • Picture of Felipe Carasso
    Fri, 25 Nov 2016, 2:54 AM
    Hi Antonio,

    That's usually a more general issue of configuring PHP or Moodle to be able to send emails. If the plugin is not succeeding in emailing the administrators, most likely Moodle itself isn't able either. For example, Moodle sends "updates available" notifications from time to time. Are you receiving these?

    You can also enable email debug communication through Administration --> Debugging and see if it gives you a hint of what's going on.

    Best regards,
    Felipe
  • Picture of Antonio Rinaldi
    Fri, 25 Nov 2016, 3:50 AM
    Solved (I hope). I made a lot of fake registrations using a temporary email service (mailinator.com). When I tried to change domain, I started to receive email notification. Why is a mistery for me, but fortunately the issue is dead. Thank you for your patience.
  • Picture of Yezi Yang
    Thu, 5 Jan 2017, 2:14 PM
    Our institution is using your plugin for external users to apply a Moodle account. to show the user account, password and email address in the notification email to applicants, we customise the language of auth_emailadmin/auth_emailadminuserconfirmation in the website site administration/language/language customisation, as can be seen below. https://pan.baidu.com/s/1jI0otG6

    However, there is a problem in the notification email, as can be seen below. The “.” in the user name is shown as “%2E”, which is the URL encoding of a dot. https://pan.baidu.com/s/1bZ0n0M

    It is defined in the code to change a dot to “%2E” in the file confirm.php. https://pan.baidu.com/s/1c2qXeZe

    However, it is also defined in the file auth.php for the notification email to system administrator about a user account application. But the way of programing is a little different from the one above. The user name displays correct in the email to the system administrator. https://pan.baidu.com/s/1eRRQ9kI

    Since the wrong usernames confuse users a lot when they get the confirmation email, it would be nice if you could solve the problem soon. Thank you very much!
  • Picture of Tim Underhay
    Mon, 27 Feb 2017, 1:05 AM
    Hello Felipe,

    Thank you for the plugin. I am attempting to use it with Moodle 3.2.1+ and no matter what I do, the "Is this your first time here / Create New Account" section never appears on the login page. In Plugins/Auth/Manage Auth, the plugin is enabled, and "Email-based self-registration with admin confirmation" is selected under "Self registration". Originally I was using PHP 7.1, but reverted to PHP 5.6, with the same results. Turning on debug messages shows no useful error messages.

    If I choose the out-of-the-box "Email-based self-registration", the "Is this your first time here / Create New Account" text is displayed, so it appears to be something particular to this plugin.

    Would you mind helping? I'd appreciate any help that you could provide!

  • Picture of Tim Underhay
    Mon, 27 Feb 2017, 2:15 AM
    I worked it out. In file /auth/classes/output/login.php, there is the following code (hopefully this shows up in the forum):

    // Authentication instructions.
    $this->instructions = $CFG->auth_instructions;
    if (is_enabled_auth('none')) {
    $this->instructions = get_string('loginstepsnone');
    } else if ($CFG->registerauth == 'email' && empty($this->instructions)) {
    $this->instructions = get_string('loginsteps', 'core', 'signup.php');
    }

    I had to add this code below it on line 106 or 107:

    else if ($CFG->registerauth == 'emailadmin' && empty($this->instructions)) {
    $this->instructions = get_string('loginsteps', 'core', 'signup.php');
    }

    After this, it seems to work fine.
  • Picture of Felipe Carasso
    Mon, 27 Feb 2017, 2:26 AM
    Hey Tim,

    I faced the same issue, but I solved it by specifying registration instructions inot the configuration. Would you try that with the vanilla code to see if it works for you?

    Thank you,
    Felip
  • Picture of Tim Underhay
    Mon, 27 Feb 2017, 2:55 AM
    Thanks, Felipe. That worked. May I suggest a note in the setup instructions and documentation for future users? Thanks, again!
  • Picture of Felipe Carasso
    Mon, 6 Mar 2017, 6:07 AM
    Hey Tim, your suggestion was executed. Thank you!
  • Picture of Daniel Apfelbaum
    Wed, 22 Mar 2017, 9:04 PM
    Hallo Felipe,

    i have the same problem like Tim.

    "Hello Felipe,

    Thank you for the plugin. I am attempting to use it with Moodle 3.2.1+ and no matter what I do, the "Is this your first time here / Create New Account" section never appears on the login page. In Plugins/Auth/Manage Auth, the plugin is enabled, and "Email-based self-registration with admin confirmation" is selected under "Self registration". Originally I was using PHP 7.1, but reverted to PHP 5.6, with the same results. Turning on debug messages shows no useful error messages.

    If I choose the out-of-the-box "Email-based self-registration", the "Is this your first time here / Create New Account" text is displayed, so it appears to be something particular to this plugin."

    What do you mean with "try that with the vanilla code"?

    Thank you,
    Daniel
  • Picture of Felipe Carasso
    Wed, 22 Mar 2017, 9:26 PM
    Hi Daniel,

    Have you tried the INSTALL (https://github.com/hrimhari/moodle-auth_emailadmin/blob/master/INSTALL) document yet? If you can't find your solution in there, it could mean that I need to improve it.

    Thank you!
    Felipe
1 2 3 4 5 6 7
Please login to post comments