diff --git a/wrenchboard/src/shared_tool/account.cc b/wrenchboard/src/shared_tool/account.cc index b27d2533..41044c65 100644 --- a/wrenchboard/src/shared_tool/account.cc +++ b/wrenchboard/src/shared_tool/account.cc @@ -1104,7 +1104,7 @@ long WrenchResetMemberPass(CVars in, CVars &out) { r1 = abs(rand()*100); // sprintf(reset_pin, "%d", r1); - snprintf(reset_pin, sizeof (reset_pin), "%d", r1); + snprintf(reset_pin, sizeof (reset_pin), "%d", r1); // I am trying to generate 4 or 5 digits random numbers here // for (i = 1; i <5; i++) // { diff --git a/wrenchboard/src/shared_tool/mobile.cc b/wrenchboard/src/shared_tool/mobile.cc index 630ffd0e..b94afe7d 100644 --- a/wrenchboard/src/shared_tool/mobile.cc +++ b/wrenchboard/src/shared_tool/mobile.cc @@ -205,6 +205,9 @@ long WrenchUpdateUserProfile(CVars in, CVars &out) { REQ_STRING(in, "city", 3, 150, "(.*)"); long member_id = REQ_LONG(in, "member_id", 1, -1); REQ_STRING(in, "uid", 3, 150, "(.*)"); + OPTIONAL(in, "online_name") REQ_STRING(in, "online_name", 3, 15, "(.*)"); + REQ_LONG(in, "pref_email", 1, -1); + REQ_LONG(in, "pref_phone", 1, -1); const PGresult *res; res = pgsql_query("SELECT * FROM members WHERE id = %lu AND uid='%s'", member_id, in["uid"].c_str() ); @@ -220,6 +223,16 @@ long WrenchUpdateUserProfile(CVars in, CVars &out) { x["state"].set_valid(true); x["city"] = in["city"]; x["city"].set_valid(true); + + x["online_name"] = in["online_name"]; + x["online_name"].set_valid(true); + + x["pref_email"] = in["pref_email"]; + x["pref_email"].set_valid(true); + + x["pref_phone"] = in["pref_phone"]; + x["pref_phone"].set_valid(true); + update_db_record(DBS_VALID, "members", x, member_id); ret = PHP_API_OK; }