Keep deleted players' names reserved

This commit is contained in:
Claude committed 2026-09-30 17:46:54 +00:00
1 parent e344e7144e
commit 78da10364f
3 files changed
+8 -6

No files matched your search

+2 -1
View File
@@ -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 [