added uid

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-23 05:46:28 -04:00
parent 67843d18bf
commit 16016428d8
+3 -2
View File
@@ -195,11 +195,12 @@ long WrenchUpdateUserProfile(CVars in, CVars &out) {
REQ_STRING(in, "state", 3, 150, "(.*)");
REQ_STRING(in, "city", 3, 150, "(.*)");
long member_id = REQ_LONG(in, "member_id", 1, -1);
REQ_STRING(in, "uid", 3, 150, "(.*)");
const PGresult *res;
res = pgsql_query("SELECT * FROM members WHERE id = %lu AND uid='%s'", member_id );
res = pgsql_query("SELECT * FROM members WHERE id = %lu AND uid='%s'", member_id, in["uid"].c_str() );
if (res != NULL && pgsql_num_rows(res) > 0) {
CVars x;
CVars x;
x["firstname"] = in["firstname"];
x["firstname"].set_valid(true);
x["lastname"] = in["lastname"];