} if (stripos($email, "ww2game.net") !== false) { throw new Exception('Invalid Email address'); } if (!$rules) { throw new Exception('You must read, and agree to, the Rules and Terms of Service'); } if ($captcha != $_SESSION['number']) { throw new Exception('You failed to match the captcha to the correct number'); } if (Activation::getByUsernameEmailCount($username, $email) > 0) { header('Location: index.php?e=4'); exit; } if (User::getByUsernameEmailCount($username, $email) > 0) { throw new Exception('That username or email already exists. If you have forgotten your password, please use the resend password link'); } // if we get here, we can add the user. $password = getPassword(); $a = new Activation(); $a->username = $username; $a->email = $email; $a->password = md5($password); $a->nation = $nation;