Firefox PHP

Mod: send notification email to Admin after registration

Posted by zwerfkat 
All files from this thread

File Name File Size   Posted by Date  
registration_notification.zip 3.7 KB open | download zwerfkat 10/18/2006 Read message
registration_notification_Phorum_5_2.zip 3.7 KB open | download Joe Curia 02/16/2009 Read message
Mod: send notification email to Admin after registration
October 18, 2006 06:41AM
This module makes it possible to automatically send a notification email to all administrators (or to a single email address, see the 'settings' dialog of the module) when a new registered user waits for approval.

Of course, the "Registration Verification" option from the "Admin - General" dialog must be set to "verified by a Moderator".

Language files for Dutch, Dutch_informal and English are included. The English version may need better translation I guess. These language files contain the subject and body texts of the notification email.

Tested with Phorum 5.1.14.

Have fun!
Attachments:
open | download - registration_notification.zip (3.7 KB)
Re: Mod: send notification email to Admin after registration
October 18, 2006 02:49PM
I think you will make many people happy with this module.
I've seen multiple requests for this feature.
Thanks for contributing!


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Mod: send notification email to Admin after registration
October 21, 2006 04:46PM
Please add this to the wiki page.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Mod: send notification email to Admin after registration
January 14, 2007 01:07PM
I've been trying to put IP information into the email but
haven't yet succeeded;~/ Think the relevant information
is contained in {MESSAGES->ip} so I inserted it into the
registration_notification.php file (addition in red):
	      "username"    => $userdata["username"],
	      "userip"      => $userdata["{MESSAGES->ip}"],
	      "login_url"   => phorum_get_url(PHORUM_LOGIN_ACTION_URL)
and then called it for the email message using the LANG file:
$PHORUM["DATA"]["LANG"]["registration_notification"]["Message"] = 
"\n'%userip%'\n\nA new user '%username%' \n(%useremail%) \n
is waiting for registration approval \non forum '%forumtitle%'.\n\n
Log in at %login_url%\n\n\n
--- this message is automatically generated by 'Phorum' ---";
It doesn't work, would you please point me in a more fruitful direction?
Re: Mod: send notification email to Admin after registration
January 14, 2007 01:29PM
heh,
{MESSAGES->ip}
is a template variable and these are surely not converted in the plain .php files.
you might want to put in

	      "userip"      => $_SERVER['REMOTE_ADDR'],


Thomas Seifert
Re: Mod: send notification email to Admin after registration
January 14, 2007 01:37PM
Slightly improved;~)

It puts in the 'local' or computer position's IP
and not the more useful ISP IP... For instance in
my own test the IP shown on the registration email
was that of my intranet (10.0.0.1).
Re: Mod: send notification email to Admin after registration
January 14, 2007 01:39PM
what?
its the remote address, so the one transferred as the clients ip.
if you are connecting from a local pc it can only transfer the local ip, you don't have access to any other data.


Thomas Seifert
Re: Mod: send notification email to Admin after registration
January 14, 2007 01:52PM
I see... OK, will run with it and wait for a real registration ----thanks;~)
Re: Mod: send notification email to Admin after registration
July 10, 2007 09:18AM
just a remark: if you've installed folders with virtual roots and you want to send the admin the url of the "user selected" folder, you have to add to

registration_notification.php:
$mail_data = array(
"mailmessage" => $PHORUM["DATA"]["LANG"]["registration_notification"]["Message"],
"mailsubject" => $PHORUM["DATA"]["LANG"]["registration_notification"]["Subject"],
"useremail" => $userdata["email"],
"forumtitle" => $PHORUM["title"],
"forumid" => $PHORUM["forum_id"],
"username" => $userdata["username"],
"login_url" => phorum_get_url(PHORUM_LOGIN_ACTION_URL)
);

lang/english.php (or your matching language file):
$PHORUM["DATA"]["LANG"]["registration_notification"]["Message"] = "\nA new user '%username%' (%useremail%) is waiting for registration approval on forum '%forumtitle%'.\n\nLog in at %login_url%?%forumid%\n\n\n--- this message is automatically generated by 'Phorum' ---";
Re: Mod: send notification email to Admin after registration
February 17, 2008 06:12AM
Is there an update for version 5.2.6a ?
Trying this script with the last Phorum version results in

Fatal error: Call to undefined function: phorum_user_get_moderators() in 
/home.10.18/innocenc/www/public/mods/registration_notification/registration_notification.php on line 18
Sorry, only registered users may post in this forum.

Click here to login