function ctl_forgot()
{
$_num_verifyId = fn_getSafe(fn_get("verify_id"), "int", 0);
$_str_verifyToken = fn_getSafe(fn_get("verify_token"), "txt", "");
if ($_num_verifyId < 1) {
return array("alert" => "x120201");
}
if (!$_str_verifyToken) {
return array("alert" => "x120202");
}
$_arr_verifyRow = $this->mdl_verify->mdl_read($_num_verifyId);
if ($_arr_verifyRow["alert"] != "y120102") {
return $_arr_verifyRow;
}
if ($_arr_verifyRow["verify_status"] != "enable") {
return array("alert" => "x120203");
}
if ($_arr_verifyRow["verify_token_expire"] < time()) {
return array("alert" => "x120204");
}
if (fn_baigoEncrypt($_arr_verifyRow["verify_token"], $_arr_verifyRow["verify_rand"]) != $_str_verifyToken) {
return array("alert" => "x120205");
}
$_arr_userRow = $this->mdl_user->mdl_read($_arr_verifyRow["verify_user_id"]);
if ($_arr_userRow["alert"] != "y010102") {
return $_arr_userRow;
}
$_arr_verifyRow["verify_token"] = $_str_verifyToken;
$_arr_tplData = array("userRow" => $_arr_userRow, "verifyRow" => $_arr_verifyRow);
$this->obj_tpl->tplDisplay("reg_forgot.tpl", $_arr_tplData);
return array("alert" => "y010102");
}