New User email notification sent to Administrator

New User email notification sent to Administrator

Eric Fisch
Vastuste arv 10

Hi all,

I am a new user to Moodle. How can I configure Moodle to send an email notification to the Administrator when a new user signs up?

Any assistance is most appreciated.

Thanks,

Eric

Keskmine hinnang: -
Vastuses Eric Fisch

Re: New User email notification sent to Administrator

Maik Riecken
Try this - very quick and dirty:

There is a file attached to this post.
  1. download
  2. rename to signup.php
  3. edit line five to your needs
  4. backup your old file /login/signup.php
  5. put it to your installation (1.5.x) to the login-folder
If you want to change the message text then you have to look to the end of the file. There is a function, which handles everything and should be self explainable.

regards,

Maik
Vastuses Maik Riecken

Re: New User email notification sent to Administrator

Eric Fisch

Thanks Maik. Extremely helpful!

Just curious... what does the following line do?

global $CFG;

Vastuses Eric Fisch

Re: New User email notification sent to Administrator

Maik Riecken
Quick and dirty, late at night. I think I thought that $CFG is not accessible via functions. Just take it away anf loo what will happen (nothing I bet...).

Maik
Vastuses Maik Riecken

Re: New User email notification sent to Administrator

Ben Jean

Hello Maik.

Thank you for that script. Now if I understand it correctly, it will notify the administrator email selected that someone is creating a new account. How could that script be modified so that the account confirmation email is sent to the administrator instead, which would also act as a notification and allow an administrator to control who gets a new account? When someone creates a new account, I want to have the user confirmation email sent to me instead so I can control who is sucessful in creating one. Once I click the confirmation, the user would receive the final account activation email. Any thoughts? Any help would be appreciated. -Ben

Vastuses Ben Jean

Re: New User email notification sent to Administrator

Maik Riecken
You have to change the function "send_confirmation_email", probably part of "auth/lib.php" to your needs, but:

Please take advice by contacting a official moodle partner. Playing with the code without knowing much about PHP (you did not find it yourself...) is extremly dangerous in my opinion.
Nobody would get the idea to change the source code of windows. For moodle there are many requests for this and that. OpenSource means free software - money is earned by support services and *must* be earned for further development...

just my two cents...

Maik
  


Vastuses Maik Riecken

Re: New User email notification sent to Administrator

Sylvain Houmeau

Hello Maik,

I just tried your interesting signup file on my site. Curiously, when i tested it, the new user got an email with an invalid link. The confirmation email gave a link leading to 'invalid confirmation data'. I looked around in the forums and found out that this was linked to an 'alphanum' error in the confirm.php file. (see post with this link http://moodle.org/mod/forum/discuss.php?d=54478&parent=248310 ) But mine is ok: it already included the right code.

So I deleted your file, and put the original signup.php file in place and it now works fine again.

I am really interested to have your file working on my site. Can you help?

Thank you very much.

sylvain

Vastuses Maik Riecken

Re: New User email notification sent to Administrator

ces moce
Hello Maik

Do you know a way to adapt your file signup_universal to a moodle 1.9...

i tried but i didn't find out how
Vastuses ces moce

Re: New User email notification sent to Administrator

R McPhee