Update email verification stuff

This commit is contained in:
Li 2022-05-22 01:20:03 +12:00
parent bbc3c09670
commit 0370556c20
2 changed files with 25 additions and 2 deletions

View file

@ -10,6 +10,18 @@ if($atype > 2 || $atype < 1)
$problems = [];
if(isset( $_GET["U"], $_GET["AC"] )){
$verify_username = $GET["U"];
$verify_token = $GET["AC"];
$hmac = GenHmacMessage($verify_username, "UserActivation", false);
$hmac_hash = bin2hex(base64_url_decode($hmac));
if(hash_equals($hmac_hash, $verify_token)){
// TODO: Activate account
}
}
if(isset( $_POST['user'],$_POST['pass1'],$_POST['pass2'],$_POST['sex'],$_POST['email'],$_POST['age'],$_POST['passreqq'],$_POST['passreqa'] ,$_POST['A']))
{
if(isset($_POST["cbr"]))