How to edit a users 'username' that has been Deleted?

surfsup

Well-known member
I removed a User per his request but he doesnt want his username still being shown, is there a way to rename his username even though I deleted his account?
 
I removed a User per his request but he doesnt want his username still being shown, is there a way to rename his username even though I deleted his account?
Ideally you would have changed his name before deleting his account, but I know that Users don't tend to think like that :)

There is a way to do it via MySQL queries but I would proceed with caution. There are many places where the username is used. This query would change any posts username attributed to Chris Deeming to 'A Deleted User' but of course there's no guarantee that there won't still be traces of the old name elsewhere...

You may even want to wait to see if someone like Jake Bunce approves of this method or if there are any other ways...

Code:
UPDATE `xf_post` SET `username` = REPLACE(`username`,'Chris Deeming','A Deleted User');
UPDATE `xf_thread` SET `username` = REPLACE(`username`,'Chris Deeming','A Deleted User');
 
I doubt it...

At the end of the day, they're the ones who have posted in the public domain. If your name appeared in a newspaper and at the time you approved that usage, you couldn't then change your mind and ask the newspaper to eradicate your name from all of the copies of the newspaper they distributed.

I'm seeing it a lot though, these types of request. I just do whatever they ask. But there's no reason for you to act upon these requests immediately. Let's see what others think of the database queries first...
 
I removed a User per his request but he doesnt want his username still being shown, is there a way to rename his username even though I deleted his account?

Just curious if you ever figured this out. I deleted an account and brain farted by forgetting to click the rename option. Now I can't do squat to get rid of the username which still shows on every post. I am not worried about references to the username in the content of posts by other users, just the threads and posts done by the deleted user.

On a related note, can all deleted users just have the same username of "Anonymous" and anytime another user gets deleted, their content just gets added to that same username? I'd rather not have a whole bunch of different unique usernames for deleted members when their content remains.
 
Ideally you would have changed his name before deleting his account, but I know that Users don't tend to think like that :)

There is a way to do it via MySQL queries but I would proceed with caution. There are many places where the username is used. This query would change any posts username attributed to Chris Deeming to 'A Deleted User' but of course there's no guarantee that there won't still be traces of the old name elsewhere...

You may even want to wait to see if someone like Jake Bunce approves of this method or if there are any other ways...

Code:
UPDATE `xf_post` SET `username` = REPLACE(`username`,'Chris Deeming','A Deleted User');
UPDATE `xf_thread` SET `username` = REPLACE(`username`,'Chris Deeming','A Deleted User');
I am in a similar situation and need to rename a deleted user, these queries are XF1 - 10 years old so wondering if they still apply/tablenames etc are the same, i only need to remove threads/posts names not worried about quotes etc

Is there a better way now ?
 
Top Bottom