if (isset($activate)) {
if (!preg_match("/^[0-9a-z]{32}$/", $activate)) fallback("index.php");
$result = dbquery("SELECT * FROM ".$db_prefix."new_users WHERE user_code='$activate'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$user_info = unserialize($data['user_info']);
$activation = $settings['admin_activation'] == "1" ? "2" : "0";
$result = dbquery("INSERT INTO ".$db_prefix."users VALUES('', '".$user_info['user_name']."', '".md5($user_info['user_password'])."', '".$user_info['user_email']."', '".$user_info['user_hide_email']."', '', '0000-00-00', '', '', '', '', '', 'Default', '0', '', '', '0', '".time()."', '0', '".USER_IP."', '', '', '101', '$activation')");
[color=blue]/* Start Send PM Notification to New User */ $new_user_id = mysql_insert_id();
$pm_subject = "WELCOME MESSAGE".$user_info['user_name']."!";
$pm_message = "Hej ".$user_info['user_name'].", \n\n THANKS FOR REGISTERING AT ".$settings['sitename'].". WE WISH YOU A PLEASANT STAY. ANY QUESTIONS LOOK AT URL . \n\n REGARDS,\n".$settings['siteusername'];
$result = dbquery("INSERT INTO ".$db_prefix."messages VALUES('', ".$new_user_id.", 1, '".$pm_subject."', '".$pm_message."', 'n', 0, ".time().", 0)");
/* End Send PM Notification to New User */[/color] $result = dbquery("DELETE FROM ".$db_prefix."new_users WHERE user_code='$activate'");
opentable($locale['401']);
if ($settings['admin_activation'] == "1") {
echo "<center><br>\n".$locale['455']."<br><br>\n".$locale['453']."<br><br>\n</center>\n";
} else {
echo "<center><br>\n".$locale['455']."<br><br>\n".$locale['452']."<br><br>\n</center>\n";
}
closetable();
if ($error == "") {
if ($settings['email_verification'] == "1") {
require_once INCLUDES."sendmail_include.php";
mt_srand((double)microtime()*1000000); $salt = "";
for ($i=0;$i<=7;$i++) { $salt .= chr(rand(97, 122)); }
$user_code = md5($email.$salt);
$activation_url = $settings['siteurl']."register.php?activate=".$user_code;
if (sendemail($username,$email,$settings['siteusername'],$settings['siteemail'],"Välkommen till ".$settings['sitename'], $locale['450'].$activation_url)) {
$user_info = serialize(array(
"user_name" => $username,
"user_password" => $password1,
"user_email" => $email,
"user_hide_email" => isNum($_POST['user_hide_email']) ? $_POST['user_hide_email'] : "1"
));
$result = dbquery("INSERT INTO ".$db_prefix."new_users VALUES('$user_code', '".$email."', '".time()."', '$user_info')");
[color=blue]/* Start Send PM Notification to New User */ $new_user_id = mysql_insert_id();
$pm_subject = "WELCOME MESSAGE ".$username."!";
$pm_message = "Hej ".$username.", \n\n THANKYOU FOR REGISTERING BLA BLA BLA ".$settings['sitename'].". WE HOPE YOU WILL FIND ANYTHING YOU LIKE HERE. IF YOU HAVE ANY QUESTIONS SEND A PM. \n\n REGARDS, \n".$settings['siteusername'];
$result = dbquery("INSERT INTO ".$db_prefix."messages VALUES('', ".$new_user_id.", 1, '".$pm_subject."', '".$pm_message."', 'n', 0, ".time().", 0)");
/* End Send PM Notification to New User */[/color]
opentable($locale['400']);
echo "<center><br>\n".$locale['454']."<br><br>\n</center>\n";
closetable();
} else {
opentable($locale['456']);
echo "<center><br>\n".$locale['457']."<br><br>\n</center>\n";
closetable();
Category Forum
Official Core Support - 6Labels
None yet
Statistics
0 participants
Notifications
You are not receiving notifications from this thread.
Related Questions