This commit is contained in:
CHIEFSOFT\ameye
2024-12-02 13:43:06 -05:00
parent 85aec6336e
commit c5af776524
+9 -3
View File
@@ -1158,6 +1158,7 @@ long CreateWrenchBoardAccount(CVars in, CVars &out) {
long CreateWrenchBoardAccountPending(CVars in, CVars &out) {
long ret = PHP_API_BAD_PARAM;
out = in;
CVars y;
try {
@@ -1234,8 +1235,8 @@ long CreateWrenchBoardAccountPending(CVars in, CVars &out) {
x["email"].set_valid(true);
x["phone"] = in["phone"];
x["phone"].set_valid(true);
x["country"] = in["country"];
x["country"].set_valid(true);
x["country"] = in["country"]; x["country"].set_valid(true);
x["refer_link"] = in["refer_link"]; x["refer_link"].set_valid(true);
if (in["loc"].length() > 0) x["loc"] = in["loc"];
x["loc"].set_valid(true);
@@ -1252,8 +1253,13 @@ long CreateWrenchBoardAccountPending(CVars in, CVars &out) {
if (ret > 0) {
pgsql_query("UPDATE members_pending SET password = md5('%s'),signup_random=%lu WHERE id = %lu", in["password"].c_str(),signup_random/1000, ret);
pgsql_query("UPDATE members_refer_friend SET status = 5 WHERE status = 1 AND email = '%s'", x["email"].c_str());
load_db_record(out, "SELECT *,id AS pending_id FROM members_pending WHERE id=%lu LIMIT 1", ret);
load_db_record(out, "SELECT *,id AS pending_id FROM members_pending WHERE id=%lu LIMIT 1", ret);
if ( in["refer_link"] !=""){
y["email"] = in["email"]; y["email"].set_valid(true);
y["refer_link"] = in["refer_link"]; y["refer_link"].set_valid(true);
insert_db_record(DBS_VALID, "referlink_signup", "referlink_signup_id_seq", y);
}
}
if (ret > 0) {