This commit is contained in:
CHIEFSOFT\ameye
2023-05-20 20:27:04 -04:00
parent 9f7628b394
commit bea0fecbac
+7 -1
View File
@@ -219,8 +219,14 @@ long WrenchFamilyInitializeAccount(CVars in, CVars &out){
logfmt(logINFO, "WrenchFamilyInitializeAccount()");
char username[15] = "";
GetOfferCode(in["family_id"].Long(), username, sizeof (username));
SetFamilyUsername(in["family_id"].Long(), username, sizeof (username));
int r1;
srand(time(NULL));
r1 = abs(rand()*10000);
pgsql_exec("UPDATE members_family SET pin='%s' WHERE id=%lu", r1, in["family_id"].Long() );
load_db_record(out, "SELECT * FROM members_family WHERE id = %lu", in["family_id"].Long());
return 0;
}