Self registration with no email confirmation

Self registration with no email confirmation

by Andreas Rekdal -
Number of replies: 125

Hi,

I want users to be able to use self registration but without email confirmation. I have search a bit and cant seem to find a easy way to do this. 

For our purpuse we could use the guest account functionality but i would rather have the users have their own account. Spam accounts dont concern me as we are not using moodle as the "main learning tool". 


Andreas

Average of ratings: -
In reply to Andreas Rekdal

Re: Self registration with no email confirmation

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You mean you want them to register with zero confirmation that their email address is correct? surprise

Sounds like a bad plan to me...

I think you would need to create a custom version of the 'email' auth plugin that just accepts whatever data the user enters. I think you will probably regret it though. 

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Self registration with no email confirmation

by Andreas Rekdal -

We are just using moodle for the quiz functionality with a plugin, and it will just be used during a lecture.

In reply to Andreas Rekdal

Re: Self registration with no email confirmation

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Don't you have a list of users somewhere so that you can create them using Upload_users? That would be much less trouble all round

In reply to Andreas Rekdal

Re: Self registration with no email confirmation

by Brandon Edwards -

Andreas,

Did you find a solution? I'm trying to do the same thing and even enabled "no authentication" under the site admin>plugins>manage authentication, but it still requires an email confirmation. None of the confirmation emails get sent though.


Thank you,

Brandon

In reply to Brandon Edwards

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

I just ran across this discussion and thought I would share an authentication plugin I created for a client who also had problems with the email confirmations.  This does not send out a confirmation email, rather, after filling out the sign up form, it goes to a page where the user clicks a button to confirm their account and they are then logged in.  The client has never reported any problems with it.  Please note this was created for 2.8 and has not been tested on any other version.  Although this is currently being used and working, please use at your own risk and try it out on a development site first if possible. 

Average of ratings: Useful (8)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Brandon Edwards -

Thank you so much for sending me this information. By any chance do you have a site with this already in place so I can see how it works?

In reply to Brandon Edwards

Re: Self registration with no email confirmation

by Ken Task -
Picture of Particularly helpful Moodlers

Check your PM on this system for a URL to test.   Just installed this on a 3.0.x highest and it worked.   Was going to try on other sandboxes as well.

To author ... good job ... this sort of thing has been needed a very long time! ;)

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Ken Task -
Picture of Particularly helpful Moodlers
@Chardelle
Tested on a 3.0.highest so far ... works as adverised.   Thanks.  

Just one question ... does it honor the email domain restriction if in place .. ie, site restriction set to corporate EMail domain only.

Comment: I've known some K12 Moodle admins that would have loved this! ;)

'spirit of sharing', Ken

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

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Good to know it will be of help.  As for the functionality, this is based on the email auth with the only difference being it does not send out the email confirmation, so all other auth functionality works the same.  Domain restriction comes from core Moodle authentication functions, not the authentication plugin itself. 

As for how it works, like I said, instead of a notice saying an email has been sent, the page after clicking to submit the signup form has a link to click which confirms the account and logs in the user (we are basically skipping the click the link from your email part and just clicking on the link on the page).  The lang string on that page comes from the auth and can be edited in your site.

Average of ratings: Useful (4)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Dan ALat -

I have been searching for a solution like this for AGES! Thank you. I tried installing it but it didn't work. Maybe I did something wrong as I am not so techie, please guide me.

Here's what I did:

Downloaded the zipped file

Uploaded it via admin>plugins>install zipped plugin>upgrade moodle

Did I miss any step?

Average of ratings: Useful (1)
In reply to Dan ALat

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers
Did you choose Authentication method (auth) as the plugin type?

If that does not work, if you have access to upload files to your server, you can also upload the zip under the moodle/auth folder, unzip it, then click on Site Administration > Notifications to install.
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Dan ALat -

Thanks Chardelle, enabling the auth type and self registration to online confirm did the trick. Woohoo!

Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Arabinda P -

Thank you Chardelle, this is a really useful Plugin.

Will it also work with Mobile App Authentication?

Kindly advise, how to make it work with Mobile App Authentication.

Is there anything special which needs to be done.

I will give it a try.



Regards

Arabinda

In reply to Arabinda P

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

I'm sorry Arabinda, I have not tried this with the mobile app.

Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by John Porten -

Thought I would mention that this plugin works great in 3.3.  We may look at upgrading it for Mobile.

Average of ratings: Useful (1)
In reply to John Porten

Re: Self registration with no email confirmation

by Daniel Lynds -

Hey all:


I have installed this plugin and wonder why/how to get it to be the primary way people enroll on the site.


Basically I want students to be able to put in a username and password and then start on a course.


Any pointers?


Average of ratings: Useful (1)
In reply to Daniel Lynds

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Hi Daniel,

This functions like any other authentication method.  Under Site Admin>Plugins>Authentication>Manage Authentication you must enable it and then place it in the top position (under Manual Accounts and No Login) if you have other methods enabled.

You can read more about authentication in the Documentation on this site.

Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Daniel Lynds -

Thanks so much for responding Chardelle:


I have done what you suggested but when I land on the login page I still don't seem to be able to use the online confirm method.


Are there other settings I need to enact in authentication?


Average of ratings: Useful (1)
In reply to Daniel Lynds

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Since this is an authentication method, users will first have to click to create their account/signup using the normal signup form.  However, they will not have to confirm their account via email, they can confirm it by clicking a button on the page once they fill out the signup form and then they will be logged in.  After that login is the same as it normally is.

Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Daniel Lynds -
Thanks for your timely responses! Most appreciated.


So what I'm trying to do is - give out links to courses where students can land and login without verification.


Not sure this plugin is the answer, but could be part of it?


Thanks all for your advice/help.

In reply to Daniel Lynds

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

I don't think that will be possible unless you have them log in as a guest.  In order to keep track of their grades, etc. in a course, they will have to sign up so they that they have their own user id. 

Average of ratings: Useful (2)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Daniel Lynds -

Hello again:


I actually may have a solve, but am wondering something - how would I make it so that the only fields they would have to fill in are username and password - would this be possible with the Online Confirm plugin?


Also, would I be able to use a direct link to a course and they login directly after confirming?

Average of ratings: Useful (1)
In reply to Daniel Lynds

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Well, yes and no.  First and last names and email addresses are required moodle fields.  For one thing, they are used for searching for one thing, you wouldn't easily be able tell your users apart if not for those and you may as well be letting them login as "guest".


That being said, there are ways to get around it, I have had clients who have done things like this.  It will require some custom coding though.  If you want to use a custom signup form, you can copy the login/signup_form.php file to the onlineconfirm folder.

Then add some code to onlineconfirm/auth.php (I don't remember if I put it in these files) like this under the function called  function can_signup() add a new function to call the new signup form like this:

/*Override signup form*/
    function signup_form() {
        global $CFG;

        require_once($CFG->dirroot.'/auth/'.$this->authtype.'/signup_form.php');
        return new login_signup_form(null, null, 'post', '', array('autocomplete'=>'on'));
    }

Then you could custom code that signup form.


As for the redirect, you can add a redirect to the user_confirm and login functions in the auth.php file under the true returns something like this:

        redirect($CFG->wwwroot.'/course/view.php?id=2);

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by H D -

Chardelle Busch

Thanks a ton for such a wonderful plugin.. Please keep updating it , its wonderful . It works without any problem. 

Thanks again..

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by G.P.A. Tech Center -

Afternoon - thank you for this plug-in it has been driving me crazy trying to find a work around.


- i have the plugin installed and i have moved it to the top under manual and no login.

- I then went to go create an account and i am still getting the following error: 

"Tried to send you an email but failed!"


Please please assist.  

In reply to John Porten

Re: Self registration with no email confirmation

by Noel Adjavon -

Hi, Please confirm if you have been able to upgrade it for the mobile.  Thanks, Noel

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Avinash Ingole -
Hello Chardelle,
I installed the plugin but when I click on create account, it just redirected to signup.php and nothing was displayed on the page. it was blank.
What went wrong. Please tell me.
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Moisés Campos Zavala -

Thank you very much Chardelle. I have installed in production moodle 3.2 and it works perfectly. It allows the user to self-register and automatically activate their account without confirming an email. Could you consider adding it to the official moodle plugin relationship? Greetings from Lima, Peru.

In reply to Moisés Campos Zavala

Re: Self registration with no email confirmation

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You must be very brave to enable this plug-in in an Internet-facing production environment. For that very reason, I don't think the Moodle developers will be happy to make this plug-in official.
wink
In reply to Visvanath Ratnaweera

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

My client has been using this authentication on many sites for years with no problems.  Obviously, you do NOT want to use this authentication for anyone with permissions in the site above that of a student.  Those users are always manual authentication.

Average of ratings: Useful (2)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Chardelle

I am glad that you keep an eye on this plug-in. I got the impression that it was a one time side product, which is not actively maintained.

For me, it was very useful. I had an application where participants join a Moodle for a one time exercise with quizzes. It was in an Internet-less class with a MoodleBox. So immediate confirmation of the account without falling back to e-mail was very convenient.

BTW, I thought https://docs.moodle.org/en/No_authentication does the same. But it reported an e-mail address change, and tried to sent an e-mail. Your plug-in solved the problem. Many thanks!
In reply to Visvanath Ratnaweera

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Thank you.  Glad it has been helpful.


Of course, Recaptcha should be implemented on the signup page.

In reply to Chardelle Busch

[onlineconfirm] PHP Warning

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Chardelle

You must be aware of this. Just in case, Moodle 3.5 and PHP 7.0.30 brings this warning:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; auth_plugin_onlineconfirm has a deprecated constructor in ./moodle/auth/onlineconfirm/auth.php on line 32
In reply to Visvanath Ratnaweera

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers

Thanks, I will take a look at that and upgrade/update the code for 3.5.

In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -

Did you updated this  "Awesome" plugin ?

It's very helpful and appreciated by all new users .

Best wishes .

In reply to H D

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers

Hi everyone,

I have updated the onlineconfirm auth for 3.1and above, which will get rid of the deprecated warning.


Average of ratings: Useful (2)
In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -

Thanks for awsome plugin  Self Registration Without Email Confirmation.
I have installed it on Moodle 3.6 and working without any issue.

I have also installed Notify Site Admin about new signup ( https://moodle.org/plugins/local_notifyemailsignup  )  This plugin sends email with all profile fields of Registration form to admin.

Now the moment I activated your plugin, I am not getting any notification of new user registration..

Is there anything which can be done to receive notification when someone register on site?

Thanks in advance.

Regards.


In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -

How to update to new version?


We have installed previous version on live site..

Not yet updated to the one supplied by you now on live site.


When we installed it on dummy site by uploading on pre-installed previous version of plugin, and tried to create new account by clicking IS THIS YOUR FIRST TIME HERE? button, it gives 500 error.

Where we are going wrong?


In reply to H D

Re: [onlineconfirm] PHP Warning

by H D -

We even tried a fresh installation of this updated version. 

The moment someone tries  to create new account by clicking button. it shows 500 error... 

In reply to H D

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers

500 errors are difficult to tell.  Make sure the onlineconfirm folder is under the moodle/auth folder.

You can also turn debugging on, then go to manage auths and see if you get any debugging errors.

As for that local notify email signup plugin, I looked at the code and for some reason, it is coded to only send an email if someone registers with the "email" authentication.  To use it with this auth, you could open the classes/observer.php file in that plugin, and on line 48 change

if ($user->auth !== 'email') {

to

if ($user->auth !== 'onlineconfirm') {

In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -

Thanks a lot for your support.

I did a fresh install of Online Confirm plugin (updated version) on a new site and activated debugging too.

When I tried to create new account following errors shows.

-------------------------------------------------------

Warning: require_once(/home/zmeklwvz/public_html/onlineconfirm/auth/onlineconfirm/signup_form.php): failed to open stream: No such file or directory in /home/zmeklwvz/public_html/onlineconfirm/auth/onlineconfirm/auth.php on line 94


Fatal error: require_once(): Failed opening required '/home/zmeklwvz/public_html/onlineconfirm/auth/onlineconfirm/signup_form.php' (include_path='/home/zmeklwvz/public_html/onlineconfirm/lib/pear:.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/zmeklwvz/public_html/onlineconfirm/auth/onlineconfirm/auth.php on line 94


-----------------------

I have yet not changed and checked lines in Notify Site admin plugin as  suggested by you.


Please guide where I am going wrong.

In reply to H D

Re: [onlineconfirm] PHP Warning

by H D -

1)

I again did fresh install with your previous version of plugin


2)

Changed line as suggested by you in "Notify admin..." plugin


3)

Its working fine (with following debugging message)

--------------------------------------


Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; auth_plugin_onlineconfirm has a deprecated constructor in /home/zmeklwvz/public_html/onlineconfirm/auth/onlineconfirm/auth.php on line 32


Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /home/zmeklwvz/public_html/onlineconfirm/lib/classes/session/manager.php on line 520

Skip to main content

× This page should automatically redirect. If nothing is happening please use the continue link below.

(Continue)

Error output, so disabling automatic redirect.

----------

Otherwise its working absolutely perfect..




In reply to H D

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers

Thanks Arkin, my mistake.  I somehow left in my code in the auth that allows you to take a copy of the login/signup_form.php and put it in the auth/onlinefirm folder, then you can modify that signup form if you want (which I do), however, I did not include the signup form.  This version has that code commented out.  You can uncomment it and use it if you wish (in the auth.php file line 90)

In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -
Sorry to bother you again..

Little more hand-holding is required.

I tried to uncomment /*Override signup form charbusch*/    by removing /* and */ but it gives error.

Can you please explain step by step? 

Please excuse me for my ignorance. 

Your help is highly appreciated at Arkin.

Thanks a ton.

N.B. Your previous version + your guidance about "notify plugin" is working excellent on live site.. we all at Arkin very happy for your such a wonderful work.

In reply to H D

Override signup form

by Chardelle Busch -
Picture of Core developers

Sure.

When the function is commented out (so it is not called), it looks like this:

/*Override signup form charbusch
    function signup_form() {
        global $CFG;

        require_once($CFG->dirroot.'/auth/'.$this->authtype.'/signup_form.php');
        return new login_signup_form(null, null, 'post', '', array('autocomplete'=>'on'));
    }
*/


If you want to make changes to the signup form, for example adding some lang strings, you can uncomment that function so it looks like this:

/*Override signup form charbusch*/
    function signup_form() {
        global $CFG;

        require_once($CFG->dirroot.'/auth/'.$this->authtype.'/signup_form.php');
        return new login_signup_form(null, null, 'post', '', array('autocomplete'=>'on'));
    }

As you can see, that function is now looking for a signup form under the auth/onlineconfirm folder.  So you have to copy the signup_form.php from the login folder into the auth/onlinecomfirm.php folder.  Now you can make changes to that file if you want.  For example, we like to remind users not to re-register just because they forgot their username or password, so I add something like this at the top of the signup form:

        $info = new stdClass();
        $info->url = $CFG->wwwroot.'/local/faq/index.php?page=signup';
        $info->forgot = $CFG->httpswwwroot.'/login/forgot_password.php';
        $info->login = $CFG->httpswwwroot.'/login/index.php';
//added info
        $mform->addElement('header', 'registerinfohead', get_string('registerinfohead', 'local_custom'), '');
        $mform->addElement('static', 'registerinfo', '', get_string('registerinfo', 'local_custom', $info));

I have a local plugin called FAQ with faq pages, and I have a local plugin called Custom where I can add any added lang strings I might use throughout the site, like the lang string saying not to re-register but to go to the forgot password form instead...

Hope this helps.
In reply to Chardelle Busch

Re: Override signup form

by H D -

Thanks for your help.

Sorry to bother you once again...

We tried everything suggested by you... we must be committing blunder somewhere..


Your previous version was totally "Ready to use out of the box" . 

May I request you to come up with this updated version like previous version "Ready to use out of the box". 

I am sure all will appreciate it, as  almost all will be fumbling with any editing in code.

Sorry again for our ignorance and thank you once again for all your help..

  

In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by Daniel Arsenault -

Hello Chardelle,

Thanks for this wonderful authentication Moodle plugin to have students signup without the confirmation of the email address in their emails. I had problems in the past where the moodle server would not send out emails using the default Email-based self-registration so I had to manually confirm there email on the admin side. This plugin help resolves that problem.

I've tested this download with Moodle version 3.7.1+ (Build: 20190718). It's working fantastic.

Thanks,

In reply to Daniel Arsenault

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers
Thanks for letting me know Daniel, glad it worked for you.  Yes, server issues can cause problems with emails, and, believe it or not, there are some users out there who still to this day do NOT have an email address, or they share an email address with a spouse who also has an account on the site.  I have one client who tells them to just user their name@example.com as their email address. 

In reply to H D

Re: [onlineconfirm] PHP Warning

by H D -

Thanks a lot.

Your App and guidance is working perfectly fine.


Will try updated version tomorrow..


Thanks again.

In reply to H D

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers

Did you unpack the zip I posted Sunday, April 14, 2019, 12:12 AM into your auth folder?  That is the version that does not require a signup_form.php file.

In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -

You posted it on 13th Saturday .... I have not downloaded.  


Where have you posted 14th Sunday update ?


Thanks again..


In reply to H D

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers
Yes, here is the file itself that you can upload to your auth/onlineconfirm folder.  This file does not require a signup_form.php file to also be in that folder
In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -

Thanks.

We will try. 

Thanks again..

In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by Avinash Ingole -
Hello Chardellle,
I am using Moodle 3.7, I installed but the signup.php page is not loaded. What would be the problem?
In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by Camila Cuadrado -
Hi Chardelle, thanks for sharing this amazing plugin. I am using it in moodle 3.91 and it works perfectly fine! smile
In reply to Camila Cuadrado

Re: [onlineconfirm] PHP Warning

by Chardelle Busch -
Picture of Core developers
Thank you Camila for letting me know.

I want to let everyone know that I have uploaded this plugin to github and the latest version, for Moodle 3.10, is there. I also have added a new plugin I have created which requires that a user enter a code before being able to signup which will act as a good addition to this authentication.
You can find the new code at https://github.com/charbusch
In reply to Chardelle Busch

Re: [onlineconfirm] PHP Warning

by H D -
Thanks a lot Chardelle Busch for updating this awesome plugin..
Three questions:-
1)
Do we have to just reinstall upgraded verstion to upgrade from previous version?

2)
For notifying new user registration, is there any specific setting? Can we uninstall any other notify plugin?

3)
Can we avaoid installing local signupcode plugin?

Thanks.
In reply to H D

Latest code

by Chardelle Busch -
Picture of Core developers

Hi Arkin,

1.  If you have upgraded your Moodle to 3.0 or higher, you can just upload the auth/onlineconfirm folder to upgrade to the latest version, nothing will change with the way it works.

2.  New user emails will only go out if you have entered email addresses into the auth onlineconfirm config settings.  If you are using another notify plugin, just leave that blank.

3.  The signup code plugin is optional, I have a client who wanted to have their local group managers give out the code to their users so they knew for sure that only their users could sign up.

In reply to Chardelle Busch

Re: Latest code

by H D -

Thanks a lot..


Installed as you suggested on a dummy site..  it's working fine..


2)

On dummy site , there is no NOTIFY plugin, I added an email address in setting of your plugin, but still it's not sending email. 

3)

Noted about signup plugin... Tried it, but uninstalled it..



Thanks a lot for awesome plugin..  I am sure you will update it for Moodle 4 too..


Thanks again.. 

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Ragini PR -
Dear Ms. Chardelle Busch,
We cannot thank you enough!
We have been having problems with Email based Self-Registration throughout as emails wouldn't be delivered.

I came across this thread and have installed your Online Confirm plugin and it is working really well for us.

(We are using Moodle 3.1.1)

Thank you again and best wishes!

Ragini
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Ehab Alnfrawy -

I am trying to use this useful plugin. I have put it after no login and manual acc. I have enabled it . Currently, I am using Moodle 3.3 and On line Confirmation 3.7 and 3.1 but i cannot got this feature yet 

Thank you in advance for helping and support   

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Franck Pouffet -

THANK YOU very much for your plugins. 

In these so complex times, I wish you to take good care of yourself and your loved ones. 

FP 

Bordeaux in France 

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Snowberry Project -
thank you so much! i am going to try this now. I have been looking for a solution to this problem for ages!
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Shane Leonard -
Big help to me - thanks Chardelle!
In reply to Shane Leonard

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Great, thanks for letting me know, glad it could help.

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Dan Rapoza -
It's been a while, but I wanted to report that I installed this in our Moodle 4.0.1 today and it works great.

We're having trouble with email configuration, resulting in no emails going out for email based self-registration. Almost all of our users self-register, so I was up a creek until I found this plugin. Whew! Thanks for putting it together! Now I can work on the email thing without the added pressure.
In reply to Dan Rapoza

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Thanks for the report Dan, I appreciate it.  There are no coding changes that are needed for 4.0, however, at some point, I will get it updated for 4.0 since it is a major version. 

If you have any questions, or suggestions, let me know.

In reply to Andreas Rekdal

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers
A couple of tips when using this plugin:

1. Please remember, you should always use Recaptcha with this plugin!
2. My clients have reported that some users never click the Button to manually confirm their account and then end up creating a second account when they can't login. If you get support calls saying they can't login, check their account first and manually confirm it if you need to. Also, it is a good idea to have it set in your config to delete unconfirmed accounts after a certain number of days.
Average of ratings: Useful (3)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Avinash Ingole -
Hello Chardelle,
I am using moodle version 3.7, after clicking on create account, link is redirected to signup.php but page is not loaded, please help.
In reply to Avinash Ingole

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers
Hello Avinash,

Authentication has changed from 3.1 to 3.7 and I have not updated this authentication method for 3.7. Please uninstall this from your 3.7 version.

I will post here when I have updated the code.
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Avinash Ingole -
Dear Chardelle,
Thanks for quick reply. Actually i managed to solved the problem which I posted. I just want to ask you that why is it working for mobile app. Create New Account option is not displaying to do registration. Request you to help in this regard.
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Deborah H -
Hello Chardelle
We also are looking forward to your updated code. We appreciate you taking time to do it.
We are new to Moodle and an 'out of the box' solution to no email confirmation will be welcomed.
In reply to Deborah H

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

I will try to get to it next week, thanks for the reminder.

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers
I have updated the onlineconfirm authentication plugin. Please be aware, I have only tested this in 3.7, however, it should work in 3.3 and above.

If possible, please test this first in a development site.

As before, this is based on the core email authentication, however, rather than having to click a link from an email to confirm, a user can click a link from the confirmation notice page after signup to confirm their account and be logged into the site.

Also, as before, please use this with caution, and always use ReCaptcha. 
Average of ratings: Useful (3)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Deborah H -

Thank you, Chardelle, for your onlineconfirm-37.zip file. I have version 3.8.

I installed the .zip, and it appears in Admin>Plugin>Authentication>Manage Authentication.

However, it doesn't appear in Admin> >Plugins>Enrollment>Manage enrol plugin

The login page has no option for a new user sign up.

Could you please advise us as to what to do next?

Deborah

In reply to Deborah H

Re: Self registration with no email confirmation

by Deborah H -

Due to other circumstances with the server, we had to re-load Moodle 3.8  Upon re installation, the onlineconfirm.zip worked perfectly.


In reply to Chardelle Busch

Re: Self registration with no email confirmation

by John Leggett -
Superb work Chardelle and thank you for your sterling efforts on our behalf. This is exactly the functionality I am looking for, i.e. not having to receive an account confirmation email.

Has anyone tried the onlineconfirm authentication plugin on version 3.8.2. of Moodle?

Cheers,


John
In reply to John Leggett

Re: Self registration with no email confirmation

by John Leggett -
Just tested it on version 3.8.2. of Moodle - seems to work great! Thanks again Chardelle!
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by John Lohr -
Thanks for your work on this plugin.  However, I can't seem to get it to work.  I installed and enabled it but when I go to /login/signup.php I get an error that says, "Sorry, you may not use this page."  I tried uncommenting the signup_form() function and copied /login/signup_form.php to /auth/onlineconfirm folder, but still the same thing.

I also tried commenting out the line that raises the error message in /login/signup.php as shown below.

if (!$authplugin = signup_is_enabled()) {

    //print_error('notlocalisederrormessage', 'error', '', 'Sorry, you may not use this page.');

}

This results in the following error, "Exception - Call to a member function signup_form() on bool"

Any guidance would be appreciated.

In reply to John Lohr

Re: Self registration with no email confirmation

by John Lohr -
Nevermind, I found the issue. Somehow the self-registration setting got disabled. Enabling this resolved the issue and the plugin is working now.
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by behzad b -

Dear Chardelle Busch thank you so much for this useful plugin.

I installed in moodle 3.1 successful.

In reply to Chardelle Busch

Ynt: Re: Self registration with no email confirmation

by Arda Cetin -
IWill there be a new update?
I'm using moodle 3.11.4+ (Build: 20211214).

It gives the following errors during installation.

Debug info:
Error code: generalexceptionmessage
×Stack trace:
line 37 of /auth/onlineconfirm/db/upgrade.php: Error thrown
line 703 of /lib/upgradelib.php: call to xmldb_auth_onlineconfirm_upgrade()
line 1929 of /lib/upgradelib.php: call to upgrade_plugins()
line 713 of /admin/index.php: call to upgrade_noncore()
In reply to Arda Cetin

Re: Ynt: Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

I will upgrade as soon as possible.  Thanks for the report.

Average of ratings: Useful (1)
In reply to Chardelle Busch

Re: Ynt: Re: Self registration with no email confirmation

by H D -

1)

I am using Moodle 3.11.5 (20220117) and I am not facing any problem with the plugin.


2)

Moodle 4.0 is on horizon... I am sure, you will come up with required upgrade.


Thanks. 

In reply to H D

Re: Ynt: Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Thanks so much for that Arkin, I appreciate it.  Now, that I actually am reading Arda's post I notice it says the error is in auth/onlineconfirm/db/upgrade.php and there is no such file.

Arda, please make sure you are using the latest version of the plugin found here https://github.com/charbusch/moodle-auth_onlineconfirm

In reply to H D

Re: Ynt: Re: Self registration with no email confirmation

by H D -
Hi,
Today Moodle 4 uploaded on GitHub .
I hope, you will come up with latest version of your awesome plugin for Moodle 4 soon..
Thanks a lot for awesome plugin.

Best wishes.
In reply to H D

Re: Ynt: Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Thanks Arkin,

As soon as 4.0 is released as a stable version I will make sure it is upgraded.  As of right now, however, I don't see any major coding changes in the auth functioning in 4.0.

In reply to Chardelle Busch

Re: Ynt: Re: Self registration with no email confirmation

by H D -

Thanks a lot..

Best wishes.


In reply to Chardelle Busch

Re: Self registration with no email confirmation

by parhaam norouzi -
Hello Chardelle
I tried this plugin on moodle3.8 + but it had bugs when it was upgraded and the site was crashing. Please also update this plugin for moodle3.8. Thank you.
In reply to parhaam norouzi

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers
Please be aware that if you are trying to use a version that is incompatible with your moodle version, it will not upgrade, but that does not mean it has bugs.

The latest version (3.7) of this plugin found here https://moodle.org/mod/forum/discuss.php?d=354562#p1587073 will work in moodle version 3.8.

If you get any error messages, please post them here.

I am sorry, I did not realize I was no longer receiving posts to this discussion.  Thanks for your posts, If you have question, let me know.
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Snowberry Project -

Chardelle, it worked beautifully! Thank you very very much!! 

In reply to Snowberry Project

Re: Self registration with no email confirmation

by Franck Pouffet -
Hello

Has anyone tried the onlineconfirm authentication plug-in on Moodle 3.9?

Thank you very much Chardelle for your work.

Franck
In reply to Franck Pouffet

Re: Self registration with no email confirmation

by John Leggett -

Hi Franck,

I have onlineconfirm running on the new Moodle 3.9 and it seems fine. 

Cheers,

John



In reply to John Leggett

Re: Self registration with no email confirmation

by Franck Pouffet -

Hi John

I also confirm now ,-) 

See you soon.

Franck 

In reply to Franck Pouffet

Re: Self registration with no email confirmation

by Franck Pouffet -

Hello

In the end, when I test the registration after giving the age and country, I get a blank page with no information.  

Thanks for your help 

Frank

In reply to Franck Pouffet

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers
Can you turn on debugging, try registering, and then post here any debugging/error messages that show on the page?
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Franck Pouffet -
Hello Chardelle

I'm not sure I'm giving you the right elements ... but here's what I can show ...


Thank you for your help
Attachment bug1.jpg
Attachment bug101.jpg
Attachment bug102.jpg
In reply to Franck Pouffet

Re: Self registration with no email confirmation

by Franck Pouffet -
After some investigations,... it seems that on moodle version 3.9 the confirmation mail with the activation link is working on my platform.
Thank you very much for your sharing.
Franck
In reply to Franck Pouffet

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Ok, Franck,

Thanks for letting me know it is working.  Those images are not debugging errors.

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Franck Pouffet -

Hello Chardelle


It's still the same but as the registration on version 3.9 works I "adopted" it again.


On the other hand, I am willing to redo the test with your solution, please tell me what I have to provide you as "image" for the bug. (I have no error code on the page)


Thanks for the help


(nb: I do my translations with DeepL, even if the translator is very efficient do not hesitate to ask me to rephrase my questions and answers)


Translated with www.DeepL.com/Translator (free version)



In reply to Franck Pouffet

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Hi Franck,

If you get a blank page, you can turn on debugging to see if an error shows on the page.

To enable debugging, go to Site administration > Development > Debugging

Choose DEVELOPER: extra Moodle debug messages for developers

Check to display

Then, be sure to turn it back off again, debugging should NOT be left on.


In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Franck Pouffet -

Hi Chardelle


Ok, I get it.


So here's my error message:


Warning: require_once(/home/cuisinev/www/moodle/auth/onlineconfirm/signup_form.php): failed to open stream: No such file or directory in /home/cuisinev/www/moodle/auth/onlineconfirm/auth.php on line 94

Fatal error: require_once(): Failed opening required '/home/cuisinev/www/moodle/auth/onlineconfirm/signup_form.php' (include_path='/home/cuisinev/www/moodle/lib/pear:.:/usr/local/php7.2/lib/php') in /home/cuisinev/www/moodle/auth/onlineconfirm/auth.php on line 94


Thank you for your help.

Franck 

In reply to Franck Pouffet

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Thanks Franck,

That is what I suspected.  Here is how to fix that.  You are using the function to have a signup_form.php file in the onlineconfirm folder, but that file is not there.

In the onlineconfirm/auth.php file, there is a function that you can use if you want to modify your signup form (I always do by adding some headings/lines of text between sections giving our users more information, etc.  In this code, that function is commented out (made invisible) but you must have made it visible.  Here is that function in the file

/**
     * Override signup form charbusch
     * To use a custom signup form, first copy the signup_form.php file
     * from the login folder to this folder and make changes to it
     * Then uncomment the signup_form() function below
*/
/* (to use this function delete this line)
    function signup_form() {
        global $CFG;

        require_once($CFG->dirroot.'/auth/'.$this->authtype.'/signup_form.php');
        return new login_signup_form(null, null, 'post', '', array('autocomplete'=>'on'));
    }
*/(to use this function delete this line)

So if you want to add a signup_form.php file to the onlineconfirm folder, then you can delete the /* and */ as per above

Or, put the /* and */ like above back in and use the normal login/signup_form.php and the errors will go away.

I hope this makes sense.

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Franck Pouffet -

Hi Chardelle


If I understand correctly, I have to delete that:




Then uninstall onlineconfirm (but I can't do that on moodle sad



Thanks for the help

In reply to Chardelle Busch

در پاسخ به: Re: Self registration with no email confirmation

by omid hamedi -

Hello. Thanks for providing this very useful plugin

Is it possible to send an email notification to the moodle admin when this plugin is active for user membership when a new user joins the site? An email containing his username and other information.

In reply to omid hamedi

Re: در پاسخ به: Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Hi Omid,

There is a local plugin that will do this. 

Please try this plugin found here https://moodle.org/plugins/pluginversions.php?plugin=local_welcome

Average of ratings: Useful (1)
In reply to Chardelle Busch

در پاسخ به: Re: در پاسخ به: Re: Self registration with no email confirmation

by omid hamedi -
Thanks Chardelle
excellent
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Franck Pouffet -

Hi Chardelle


Your solution finally got into my brain... it takes the time it takes smile))) 


But it's all right now, I'm using your plugin again.


Thanks


Have a nice day.  

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Sati Pasala NSW Inc -

Thank you Chardelle. I have just installed in 3.9 and works beautifully. Our requirement is that most people will not have emails. So I have enabled the multiple logins can have the same email option and installed this plugin. Thank you

In reply to Sati Pasala NSW Inc

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Thanks for letting me know Sati, glad it helped.

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Max Haren -

Hi Chardellee,

I use a different theme and i get the following error on the sign up page. But despite the error the plugin is working fine. How do i fix the error?

 /login/signup.php

This page should be using theme herald which cannot be initialised. Falling back to the site theme moove

  • line 687 of /lib/outputlib.php: call to debugging()
  • line 7436 of /lib/moodlelib.php: call to theme_config::load()
  • line 702 of /lib/classes/user.php: call to get_list_of_themes()
  • line 863 of /lib/classes/user.php: call to core_user::fill_properties_cache()
  • line 50 of /login/signup_form.php: call to core_user::get_property_type()
  • line 214 of /lib/formslib.php: call to login_signup_form->definition()
  • line 317 of /lib/authlib.php: call to moodleform->__construct()
  • line 80 of /login/signup.php: call to auth_plugin_base->signup_form()


In reply to Max Haren

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Hi Max,

You did not say what version you are using.  As was mentioned above, in one of the downloads, I had accidentally left in a function that allows you to have a custom signup_form in the auth, and since the error is referring to the signup form, this might be the problem.  Please open/edit the auth/onlineconfirm/auth.php file and do a search for the function

function signup_form()

If that function is in there, please delete the entire function and see if that gets rid of the error. 

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Max Haren -
Hi Chardelle,

I use moodle version 3.8 and the onlineconfirm-37.zip file from 20 november 2019. I have tried to remove rule 90 til rule 103 from the auth/onlineconfirm/auth.php file but that didn't remove the errors on the signup page.

Do you have any other suggestions?
In reply to Max Haren

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Ok, then this is definitely a problem with your theme.  You can try purging caches and see if that helps.  Other than that, you will have to contact the theme developer (most likely that theme is not updated to run on your Moodle version) or use a different theme.

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Han Thet Nyein -
Thank you, Chardelle Bush. Your plugin is the best solution for my need. I have another problem and I'm a beginner level programmer. Can you help me, please? The error occurs when I click back button after registered and logged in. The error is in the following,

-------------------------------------

Confirm Form Resubmission

This webpage requires data that you entered earlier in order to be properly displayed. You can send this data again, but by doing so you will repeat any action this page previously performed.

Press the reload button to resubmit the data needed to load the page.
ERR_CACHE_MISS
In reply to Han Thet Nyein

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

That is standard for any web form, reloading the form will prompt the browser to resend any data that is in the form.  I'm not sure why anyone would click the back button on their browser after logging in or signing up.

In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Han Thet Nyein -

Thank you Chardells for your reply. Yes, it is PHP's problem as you say. Is there any way to prevent back button clicking on their home page or other solution? Because, my target users are children who are not unfamiliar with Moodle and other LMSs. Looking forward to any guidance and thank you for your time.

In reply to Han Thet Nyein

Re: Self registration with no email confirmation

by Chardelle Busch -
Picture of Core developers

Well, no, this really is not a PHP problem, it is simply a problem of clicking the back button in the browser.  And it seems like using Chrome is what gives that error code.  You might simply try putting an HTML block or something similar on your home page with large instructions to not click the back button, or maybe a large button that says ClICK HERE that goes to a course page or something similar. 

Average of ratings: Useful (2)
In reply to Chardelle Busch

Re: Self registration with no email confirmation

by Han Thet Nyein -

Thank you so much Chardelle for your guidance. That solution would be the best way. Thanks smile

In reply to Andreas Rekdal

Re: Self registration with no email confirmation

by Jay H. -

Just wanted to throw out there...


Nothing changed on my end except for the version of Moodle that I was using.  But I no longer had any students enrolling.  Even though I tended to have 2+ per month and it was only $85 tuition.


Then I recalled that I had emailed my hosting support people and told them I was having a ton of trouble with email reliability and found that my domain/ip had been blacklisted (shared host).  I also hired a Moodle expert on freelancer.com I think it was.  He concluded what I was already thinking.  The Host patched something to make email sending significantly harder.  Apparently Moodle email confirmation was affected by such patches.  Still working with hosting on a solution and will probably try SMTP settings instead.  Tried signing up for free pepipost last night but they deemed me a potential spammer and denied me after a ton of work.  So IDK, I may have to pay a service but it would be worth it for me because I am sick of losing tuition money.  Hope this helps someone that doesn't have standard resolution to their issues.

In reply to Jay H.

Re: Self registration with no email confirmation

by Ken Task -
Picture of Particularly helpful Moodlers

@J.H.    your posting probably should have it's own thread.   But I'll 'throw back' ... with 'free' suggestion.

Can tell you are frustrated ...

Shared Hosted is an issue ... and will be forever ... for reasons such
as you have described.

Go to:
https://mxtoolbox.com/blacklists.aspx
Use the IP of your server.
Then do again with the FQDN of your slice of the shared hosting server.

IF listed in a blackhole service a link might be provided to the service
that will describe the process to get off that blacklist ... if possible ...
again ... shared hosting.

'Expert help' ... am just a community member who is offering free ... free advice.

Higher versions of Moodle can use SMTP via Sendgrid API Key.
Have to acquire an account with SendGrid then set up an API key.
The values you plugin to your moodle in SMTP config.

See:

https://moodle.org/mod/forum/discuss.php?d=392578#p1662786

https://sendgrid.com/

'SoS', Ken