fix fetch

This commit is contained in:
CHIEFSOFT\ameye
2023-09-16 22:36:37 -04:00
parent 4c655539f9
commit f05e3a93a8
+4 -2
View File
@@ -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) {
map<const char*, const char*>f = 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);
}