Big Commit

This commit is contained in:
Vortrex
2021-05-06 01:29:46 -05:00
parent a4c1172df4
commit d58abe4287
20 changed files with 369 additions and 222 deletions

View File

@@ -647,10 +647,14 @@ function createAccount(name, password, email = "") {
let dbQuery = queryDatabase(dbConnection, `INSERT INTO acct_main (acct_name, acct_pass, acct_email, acct_when_registered) VALUES ('${safeName}', '${hashedPassword}', '${safeEmail}', UNIX_TIMESTAMP())`);
if(getDatabaseInsertId(dbConnection) > 0) {
let accountData = loadAccountFromId(getDatabaseInsertId(dbConnection), true);
createDefaultKeybindsForAccount(accountData.databaseId);
createDefaultAccountServerData(accountData.databaseId);
return accountData;
let tempAccountData = loadAccountFromId(getDatabaseInsertId(dbConnection), false);
createDefaultKeybindsForAccount(tempAccountData.databaseId);
createDefaultAccountServerData(tempAccountData.databaseId);
tempAccountData.keyBinds = loadAccountKeybindsFromDatabase(tempAccountData.databaseId);
tempAccountData.messages = loadAccountMessagesFromDatabase(tempAccountData.databaseId);
tempAccountData.notes = loadAccountStaffNotesFromDatabase(tempAccountData.databaseId);
tempAccountData.contacts = loadAccountContactsFromDatabase(tempAccountData.databaseId);
return tempAccountData;
}
}