diff --git a/wrenchboard/src/shared_tool/mobile.cc b/wrenchboard/src/shared_tool/mobile.cc index 481a2c3c..215c29d3 100644 --- a/wrenchboard/src/shared_tool/mobile.cc +++ b/wrenchboard/src/shared_tool/mobile.cc @@ -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"];