diff --git a/wrenchboard/src/shared_tool/mobile.cc b/wrenchboard/src/shared_tool/mobile.cc index a1fbf083..1b0fb99b 100644 --- a/wrenchboard/src/shared_tool/mobile.cc +++ b/wrenchboard/src/shared_tool/mobile.cc @@ -209,7 +209,7 @@ long WrenchUpdateUserProfile(CVars in, CVars &out) { REQ_STRING(in, "firstname", 3, 49, "(.*)"); REQ_STRING(in, "lastname", 3, 49, "(.*)"); REQ_STRING(in, "email", 5, 150, "(.*)"); - REQ_STRING(in, "state", 3, 150, "(.*)"); + REQ_STRING(in, "state",2, 150, "(.*)"); REQ_STRING(in, "city", 3, 150, "(.*)"); long member_id = REQ_LONG(in, "member_id", 1, -1); REQ_STRING(in, "uid", 3, 150, "(.*)"); @@ -232,8 +232,11 @@ long WrenchUpdateUserProfile(CVars in, CVars &out) { x["city"] = in["city"]; x["city"].set_valid(true); - x["online_name"] = in["online_name"]; - x["online_name"].set_valid(true); + if ( in["online_name"] != ""){ + x["online_name"] = in["online_name"]; + x["online_name"].set_valid(true); + } + x["pref_email"] = in["pref_email"]; x["pref_email"].set_valid(true);