Mod: Registration N...
 
Notifications
Clear all

Mod: Registration Notice

5 Posts
3 Users
0 Reactions
2,409 Views
(@hpfanficarchive-com)
Posts: 41
Eminent Member
Topic starter
 

This mod will send you a notice when someone registers.


in user/editbio.php

At around line 115 find:

include("user/login.php");

Add under:

$RegIP = $_SERVER['REMOTE_ADDR'];
$RegHost = gethostbyaddr($RegIP);

$RegNoticeTo = 'YOUR EMAIL ADDRESS HERE';
$RegSubject = "Registration Notice";
$RegHeaders = 'From: YOUR EMAIL ADDRESS HERE' . "rn" . 'Reply-To: YOUR EMAIL ADDRESS HERE' . "rn" . 'X-Mailer: PHP/' . phpversion();
$RegMessage = "Username: $penname" . "rn" . "Email: $email" . "rn" . "IP: $RegIP" . "rn" . "Host: $RegHost";

mail($RegNoticeTo, $RegSubject, $RegMessage, $RegHeaders);

Save & upload

  • YOUR EMAIL ADDRESS HERE - Needs to be changed 3 times to your email address

http://www.FicSavers.Com
http://www.HPFanFicArchive.Com
http://www.FavoritesTracker.Org

 
Posted : 19/08/2016 7:51 pm
(@ladama)
Posts: 57
Trusted Member
 

Thanks for this mod! Added it to my test archive last night, did a "mock" registration and worked like a charm, now it's on the live site waiting to do it's thing when there's a registration!

Question, is it possible to have the notification go to multiple email addresses? I'd like an email to go to all our admins, so whoever gets the mail first can check right away and deal with any spam reviews. Thanks!

 
Posted : 13/09/2016 9:34 pm
(@hpfanficarchive-com)
Posts: 41
Eminent Member
Topic starter
 

Thanks for this mod! Added it to my test archive last night, did a "mock" registration and worked like a charm, now it's on the live site waiting to do it's thing when there's a registration!

Question, is it possible to have the notification go to multiple email addresses? I'd like an email to go to all our admins, so whoever gets the mail first can check right away and deal with any spam reviews. Thanks!

Here is a bit of a modification to the original.  Just be sure to change the "USER@DOMAIN.COM" placeholders as needed...

This also adds the bio and website info if they filled it in at registration.



$RegIP = $_SERVER['REMOTE_ADDR'];
$RegHost = gethostbyaddr($RegIP);

//You can change Webmaster to whatever you want, if you want.
$RegTo = 'Webmaster <USER@DOMAIN.COM>' . "rn";

//You can change Registration Notice to whatever you want, if you want.
$RegHeaders = 'From: Registration Notice <USER@DOMAIN.COM>' . "rn";

//Uncomment below if you want to CC or BCC other address. Add or remove address as needed. Be sure to use a , between them.
//$RegHeaders .= 'Cc: USER@DOMAIN.COM,USER@DOMAIN.COM,USER@DOMAIN.COM' . "rn";
//$RegHeaders .= 'Bcc: USER@DOMAIN.COM' . "rn";

//You can change Registration Notice to whatever you want, if you want.
$RegSubject = "Registration Notice";

$RegName = $_POST['realname'];
$RegWebsite = $_POST['af_website'];
$RegBio = $_POST['bio'];
$RegIP = $_SERVER['REMOTE_ADDR'];
$RegHost = gethostbyaddr($RegIP);

$RegBio = strip_tags($RegBio);

$RegMessage = "Name: $RegName" . "rn" . "Username: $penname" . "rn" . "Email: $email" . "rn" . "Website: $RegWebsite" . "rn" . "Bio: $RegBio" . "rn" . "IP: $RegIP" . "rn" . "Host: $RegHost";

mail($RegTo, $RegSubject, $RegMessage, $RegHeaders);

http://www.FicSavers.Com
http://www.HPFanFicArchive.Com
http://www.FavoritesTracker.Org

 
Posted : 13/09/2016 10:26 pm
 lucy
(@lucy)
Posts: 52
Trusted Member
 

Thanks for this. I will add it to my site.

 
Posted : 14/09/2016 9:28 am
(@ladama)
Posts: 57
Trusted Member
 

Curious if there's a way to add a link either directly to the new registration's profile or even just a link to my archive's home page to the registration message so I can click it from the email and get there right away?

 
Posted : 08/10/2016 1:44 pm
Share: