return; } if (!preg_match('/^[a-fA-F0-9]+$/', $code)) { event::fire('HAX_CONFIRMATION_CODE'); $code = $_POST['code']; $userid = intval($_POST['userid']); $msg = 'The confirmation code is borked, did you tamper with the URL?'; return; } if (strlen($code) < 32) { event::fire('HAX_CONFIRMATION_CODE'); $code = $_POST['code']; $userid = intval($_POST['userid']); $msg = 'The confirmation code is borked, did you tamper with the URL?'; return; } if ($password != $cpassword) { $msg = 'The passwords you entered do not match.'; $code = $_POST['code']; $userid = intval($_POST['userid']); return; } if ($auth->checkCode($userid, $code)) { $isConfirmed = 1; $auth->resetPassword($userid, $password); return; } else { $msg = 'Confirmation code is wrong. <a href=\\"#\\">Click here to recieve another one.</a>'; return; } }