fix user lenght
This commit is contained in:
@@ -219,14 +219,13 @@ long WrenchFamilyInitializeAccount(CVars in, CVars &out){
|
||||
const PGresult *res;
|
||||
logfmt(logINFO, "WrenchFamilyInitializeAccount()");
|
||||
|
||||
char username[6] = "";
|
||||
SetFamilyUsername(in["family_id"].Long(), username, sizeof (username));
|
||||
char username[7] = "";
|
||||
SetFamilyUsername(in["family_id"].Long(), username, 6);
|
||||
|
||||
int r1;
|
||||
//srand(time(NULL));
|
||||
r1 = 1000+(rand()%9000);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user