• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

User Error/Question.

Edrondol

Well-known member
#1
Someone on my site posted something they shouldn't have. Their friend (whom they'd posted about) saw it and was very upset. User contacted me and asked my to remove his account, which I did. But his name is still associated with all his other posts and there's no easy way to change them as his account was already deleted.

What command can I put in the SQL to change the name on all his posts?
 

Brogan

XenForo moderator
Staff member
#2
Ideally you should do any user name changes before deleting accounts, as it is much more difficult to do it afterwards.

Try this, but take a backup first!

Code:
UPDATE xf_post SET username = REPLACE(username,'Original_Username','New_Username')