From 9f01ea2606c4bfd7999bfa4bd7dae1f47a77049d Mon Sep 17 00:00:00 2001 From: Li Date: Sat, 21 May 2022 13:13:00 +1200 Subject: [PATCH] Add files via upload --- master-site/web/header.php | 2 +- master-site/web/newuser.php | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/master-site/web/header.php b/master-site/web/header.php index 8491ec5..e46fc4a 100644 --- a/master-site/web/header.php +++ b/master-site/web/header.php @@ -6,7 +6,7 @@ if(!function_exists('is_logged_in')) include('../common.php'); -$host = $_SERVER['HTTP_HOST']; + ?> diff --git a/master-site/web/newuser.php b/master-site/web/newuser.php index 83dfbcc..79df40a 100644 --- a/master-site/web/newuser.php +++ b/master-site/web/newuser.php @@ -127,11 +127,18 @@ if(isset( $_POST['user'],$_POST['pass1'],$_POST['pass2'],$_POST['sex'],$_POST['e if(count($problems) <= 0) { - $stmt = $connect->prepare("INSERT INTO Users VALUES(?,?,?,?,?,?,?,?,?,?,'NO','NO')"); - $stmt->bind_param("isssssisss", $user_id, $username, $email, $country, $reset_question, $answer_hash, $age, $password_hash, $hex_salt, $gender); + $activated = "NO"; + if(!$email_activation){ + $activated = "YES"; + } + + $stmt = $connect->prepare("INSERT INTO Users VALUES(?,?,?,?,?,?,?,?,?,?,'NO','NO',?)"); + $stmt->bind_param("isssssissss", $user_id, $username, $email, $country, $reset_question, $answer_hash, $age, $password_hash, $hex_salt, $gender, $activated); $stmt->execute(); - echo('
Your account has been added!
Look for the email from support@horseisle.com with your activation code!
You cannot play until you CLICK the link with your code in the email.
Be sure to check your Spam email box in case it goes there. If you do not get the email soon, feel free to log in with your username and password to re-send the Activation Code to the same or a different email address.

Go Back to Main Page

'); + send_activation_email($email, $username, $password); + + echo('
Your account has been added!
Look for the email from '.$from_email.' with your activation code!
You cannot play until you CLICK the link with your code in the email.
Be sure to check your Spam email box in case it goes there. If you do not get the email soon, feel free to log in with your username and password to re-send the Activation Code to the same or a different email address.

Go Back to Main Page

'); include("footer.php"); exit(); }