diff --git a/wrenchboard/src/shared_tool/account.cc b/wrenchboard/src/shared_tool/account.cc index bdb3dea6..25e914ab 100644 --- a/wrenchboard/src/shared_tool/account.cc +++ b/wrenchboard/src/shared_tool/account.cc @@ -2122,9 +2122,11 @@ long LoginWrenchBoardQRAccount(CVars in, CVars &out) { " WHERE f.uid = '%s' AND f.username = '%s' AND m.uid = '%s' ", in["family_uid"].c_str(), in["member_username"].c_str(), in["member_uid"].c_str()); if (res != NULL && pgsql_num_rows(res) > 0) { mapf = pgsql_fetch_assoc(res,0); + CVars rec; + map_to_cvars(f, rec); CVars inx; - inx["username"] = f["username"]; inx["username"].set_valid( true ); - inx["pin"] =f["pin"]; inx["pin"].set_valid( true ); + inx["username"] = rec["username"]; inx["username"].set_valid( true ); + inx["pin"] = rec["pin"]; inx["pin"].set_valid( true ); inx["login_mode"] = LOGIN_MODE_FAMILY; inx["login_mode"].set_valid( true ); return LoginWrenchBoardAccount(inx, out); }