Keep deleted players' names reserved
This commit is contained in:
3 files changed
+8
-6
No files matched your search
@@ -119,7 +119,8 @@ pub async fn purge_user(state: &AppState, user: &UserRow) -> AppResult<PurgeRepo
|
||||
run(c, "UPDATE economy_transactions SET to_uuid = ?, to_name = ? WHERE to_uuid = ?", &[DELETED_UUID, DELETED_NAME, uuid]).await?;
|
||||
|
||||
// ---- identity ----
|
||||
report.add("name_reservations", run(c, "DELETE FROM reserved_usernames WHERE uuid = ?", &[uuid]).await?);
|
||||
// `reserved_usernames` is kept on purpose: a deleted player's name stays
|
||||
// taken so nobody can impersonate them. It holds only the name and UUID.
|
||||
// Explicit, in case a foreign key is ever relaxed.
|
||||
let id = user.id.to_string();
|
||||
for (area, sql) in [
|
||||
|
||||
Reference in new issue
Block a user