fix reupload acc not having a user

This commit is contained in:
Jill 2023-01-05 20:25:25 +03:00
parent c029f7a0d2
commit 557280985e
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ module CrystalGauntlet::Reupload
rescue
next_id = IDs.get_next_id("accounts")
DATABASE.exec("insert into accounts (id, username, password, gjp2, email, is_admin, messages_enabled, friend_requests_enabled, comments_enabled) values (?, ?, ?, ?, ?, ?, ?, ?, ?)", next_id, REUPLOAD_ACC_USERNAME, "!", "!", "", 1, 0, 0, 0)
DATABASE.exec("insert into users (id, udid, account_id, registered, username) values (?, ?, ?, ?, ?)", IDs.get_next_id("users"), nil, next_id, 1, REUPLOAD_ACC_USERNAME)
LOG.debug { "created reupload acc id #{next_id}" }
@@reupload_acc_id = next_id
end