diff --git a/master-site/account.php b/master-site/account.php index e977cb9..547359f 100644 --- a/master-site/account.php +++ b/master-site/account.php @@ -3,8 +3,35 @@ session_start(); include("servers.php"); include("common.php"); include("crosserver.php"); +include("config.php"); +$eml_err = NULL; +if(isset($_POST["RESENDEMAIL"], $_POST["USER"], $_POST["PASS"])){ + $username = $_POST["USER"]; + $password = $_POST["PASS"]; + if(!user_exists($username)) + goto improper_auth; + + $id = get_userid($username); + //TODO: $eml_err = "Email account has been banned."; + if(check_password($id, $password)){ + if(!preg_match('/^[A-Za-z0-9_.+-]*\@[A-Za-z0-9_.+-]*\.[A-Za-z0-9_.+-]{1,4}$/',$_POST["RESENDEMAIL"])){ + $eml_err = "Email does not appear to be a valid format."; + + goto email_error; + } + send_activation_email($_POST["RESENDEMAIL"], $username, $password); + include("web/header.php"); + echo("
Your activation email has been re-sent to ".htmlspecialchars($_POST["RESENDEMAIL"])." Look for the email from ".htmlspecialchars($from_email)." with your activation code! You cannot login until you CLICK the link with your code in the email. Be sure to check your Spam email box in case it goes there. Go Back to Main Page |