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

XF 1.1 How to change one username by msql queries?

Barbossa

Active member
#1
Hi,

How can I change username let us say "Tom" into "Jerry"? I want to do this through mysql queries.

Thanks in advance.
 

karll

Well-known member
#4
It would be something like this:

Code:
update xf_user set username = 'Jerry' where username = 'Tom';
Disclaimer: I've never changed a username this way before, but I believe the above SQL should be correct. If for some reason it doesn't work properly, you can always just change it back with a similar query.
 

karll

Well-known member
#6
It'd be easier via the ACP, I'm not sure if there are other tables that need updating with the username.
Yes, that would be my worry as well, but if Barbossa desperately wants to try the SQL route, then he can try the above query.