obey-robots.txt
View Thread
Post your improvements and modifications to sendmail_include.php here.
 Print Thread
Get email when new user registers
Fusioneer
This mod sends you an email if a new user is successfully registered.

Open register.php and find:

Download source  GeSHi: PHP
  1. $data = dbarray($result);
  2. $user_info = unserializeFix(stripslashes($data['user_info']));
  3. $result = dbquery("INSERT INTO ".DB_USERS." (".$user_info['user_field_fields'].") VALUES (".$user_info['user_field_inputs'].")");
  4. $result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_code='".$_GET['code']."' LIMIT 1");
  5.  
Parsed in 0.039 seconds, using GeSHi 1.0.8.10


Add directly below this code:
Download source  GeSHi: PHP
  1. // Mod Wanabo. Get values and send them by mail to the site email.
  2. require_once INCLUDES."sendmail_include.php";
  3. $user_field_fields = explode(', ', $user_info['user_field_fields']); // for getting array of fields
  4. $user_field_inputs = explode(', ', $user_info['user_field_inputs']); // for getting values
  5. foreach($user_field_inputs as $k => $val) { $user_field_inputs[$k] = trim($val, "'"); }
  6. $message = array_combine($user_field_fields, $user_field_inputs);
  7. extract($message);
  8. $message = "user_name: ".$user_name."\nuser_email: ".$user_email."\nhttp://whois.domaintools.com/".$user_ip."\n\nCode from: http://php-fusion.org";
  9. $subject = $locale['u160'];
  10. sendemail($settings['siteusername'], $settings['siteemail'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
  11. // End Mod
  12.  
Parsed in 0.020 seconds, using GeSHi 1.0.8.10


So it will look like:
Download source  GeSHi: PHP
  1. $data = dbarray($result);
  2. $user_info = unserializeFix(stripslashes($data['user_info']));
  3. $result = dbquery("INSERT INTO ".DB_USERS." (".$user_info['user_field_fields'].") VALUES (".$user_info['user_field_inputs'].")");
  4. $result = dbquery("DELETE FROM ".DB_NEW_USERS." WHERE user_code='".$_GET['code']."' LIMIT 1");
  5. // Mod Wanabo. Get values and send them by mail to the site email.
  6. require_once INCLUDES."sendmail_include.php";
  7. $user_field_fields = explode(', ', $user_info['user_field_fields']); // for getting array of fields
  8. $user_field_inputs = explode(', ', $user_info['user_field_inputs']); // for getting values
  9. foreach($user_field_inputs as $k => $val) { $user_field_inputs[$k] = trim($val, "'"); }
  10. $message = array_combine($user_field_fields, $user_field_inputs);
  11. extract($message);
  12. $message = "user_name: ".$user_name."\nuser_email: ".$user_email."\nhttp://whois.domaintools.com/".$user_ip."\n\nCode from: http://php-fusion.org";
  13. $subject = $locale['u160'];
  14. sendemail($settings['siteusername'], $settings['siteemail'], $settings['siteusername'], $settings['siteemail'], $subject, $message);
  15. // End Mod
  16.  
Parsed in 0.024 seconds, using GeSHi 1.0.8.10


It will send you an email like this:

user_name: someusername
user_email: some@emailsample.net
http://whois.domaintools.com/1.2.3.4

If you want to find out where the new registered user is coming from, just click: http://whois.domaintools.com/1.2.3.4

Please refer to this thread with (remove space before =):
[url =http://php-fusion.org/forum/viewthread.php?thread_id=62]Get email when new user registers[/url]
Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
 
Balin50
will this mod for V9?
 
http://bageo.eu
Fusioneer
Probably not. I plan to make this work with v9 also. But I have not done anything with v9 yet.
Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
 
Jump to Forum
New Thread Post Reply
Use BBcode or HTML to refer to; 'Get email when new user registers'
BBcode:
HTML:
Simular threads
Subject Discussion Forum         Last Post
Messages.php no limits for user groups Modifications to messages.php : 1 05-03-2013