Set all anonymized user names to common "deleted user"

AI-generated summary

The discussion revolves around configuring Discourse to assign a common username, such as “deleted user”, to anonymized users instead of unique usernames. thea initiated the discussion, and Don suggested manually changing the username. Simon_Manning proposed merging anonymized users into a single “deleted_user” account, emphasizing the importance of anonymizing the user first to avoid email address conflicts. thea inquired about managing this process via API, and Simon_Manning indicated that while anonymizing users has API documentation, merging users does not, and suggested exploring existing topics or reverse-engineering the Discourse API.

I am wondering how you can configure Discourse to give all anonymized users a common username such as “deleted user” or “anonymized user”, instead of having unique anonymized usernames.

As admin you can change their username manually. Just go to their profile and edit the username. :slightly_smiling_face: But I believe it should be unique as well so maybe just rewrite the anon to deleted_user and keep the numbers.

Users can be merged so you can change the username of one anonymized user to deleted_user as @Don suggests, then merge all other anonymized users into deleted_user.

When you want to do this in future, anonymize the user first and then merge into deleted_user. It’s important to anonymize the user first because the account being merged into will take on the email address as its secondary email address.

I see - think that could be managed via API?

I expect the answer is yes but I only see API documentation for anonymizing users, not merging them, so I will go with probably. For merging there may be existing topics about it or there is this: