Locked out - need to enable email-based self-registration

Locked out - need to enable email-based self-registration

by Sylvia Currie -
Number of replies: 7
In preparation for summer vacation I disabled the email-based self-registration option on our Moodle site because nobody is available to deal with spammers. Unfortunately, this is preventing all site users who had previously self-registered from logging in. That includes me!

How do enable self-registration again? I'm an admin, but not primary admin. 

From the documentation (which I wish I had read before flipping the switch! smile )
The Email-based self-registration authentication plugin must be enabled to allow users who previously self-registered to login with that plugin.

Average of ratings: -
In reply to Sylvia Currie

Re: Locked out - need to enable email-based self-registration

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers

The primary admin is probably a “manual” user so will still be able to log in. Ask them to edit your profile and change the authentication method to manual and you should be able to log in too.

Then you’ll need to do the same for all current users. If you have lots of users and have access to the backend database, you can do this through a sql query but if not, you can also do it using the bulk user upload functionality. Download your users, add an “auth” column (should be manual for all) and upload them again. Set the options in the upload to “update current users only”. I can you give detailed instructions if you need it.

In reply to Jon Bolton

Re: Locked out - need to enable email-based self-registration

by Sylvia Currie -
Thank you for the clear instructions, Jon. The primary admin is also on vacation so I'm trying to hunt him down.

If after I get access can I solve the problem by enabling self-registration again? At this point I'd prefer that than to cause further chaos by editing the bulk user file. We have 5,000+ accounts.

Thanks again!
In reply to Sylvia Currie

Re: Locked out - need to enable email-based self-registration

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Yes, simplest thing would be enable self-registration again (sorry, assumed you wanted that off over the summer).

Do you have reCAPTCHA switched on for your self-registration form? That will reduce a lot of spam registrations, but not all.

And you could also consider the Email Based Self-Registration with Admin Approval plugin in the future.
In reply to Sylvia Currie

Re: Locked out - need to enable email-based self-registration

by Ken Task -
Picture of Particularly helpful Moodlers

If you can access config.php file and edit, one could possibly turn on auth via email by adding a line to config.php.  If you have other authentications, like LDAP/other, you should include those as well or you'll then lock those users out. 

Manual accounts are always on. 

Students using mobile devices and the Moodle App? then one would also need 'webservices' added to the line.

Lines added just *above* the comment at the end of the config.php file - not below that comment.  No need to restart services, just hit site with browser.

$CFG->auth="email,webservice";
$CFG->authloginviaemail="1";

That then gets you in where you could navigate to the GUI area for turning on and set that there.

After everything 'back to normal', comment out the lines added by placing // in front of them.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Locked out - need to enable email-based self-registration

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ...

There is also an enrolment setting for versions 3.7,3.6,3.5,and 3.4.   Think for those the following is default:
 
$CFG->enrol_plugins_enabled="manual,guest,self,cohort";

So 'locked out' could be two fold ... auth + enrol method depending. sad

'spirit of sharing', Ken


In reply to Ken Task

Re: Locked out - need to enable email-based self-registration

by Glen MacPherson -
Okay, it's sorted out now. The cause of the suspended accounts appears to be, as implied above, that if a student registered by email, then email-based self-registration must continue to be enabled even after their account has been created (which seems quite a bizarre policy to me). Also, it must be enabled in two different places (also seems strange).
Thank you again, everybody, for your assistance.
In reply to Glen MacPherson

Re: Locked out - need to enable email-based self-registration

by Ken Task -
Picture of Particularly helpful Moodlers

Well, not really 'bizarre' if one is allowing password change.

A user who self registered via email based would be sent a confirmation message before change would be made.  If your users were auth via LDAP, then change of password would involve the LDAP server.

As far as 2 places ... site level and course level?

Just think how interesting this will become with 2 factor authentications and/or biometric as well so enjoy the current while you can! smile

'SoS', Ken