query - My SQL function to change user_name

My wordPress database was hacked and all users_names were changed to the same thing. I'd like to write a mySql quer

My wordPress database was hacked and all users_names were changed to the same thing. I'd like to write a mySql query to replace all usernames that = "x" to the user_nicename. I'm unsure how to do this - any suggestions?

My wordPress database was hacked and all users_names were changed to the same thing. I'd like to write a mySql query to replace all usernames that = "x" to the user_nicename. I'm unsure how to do this - any suggestions?

Share Improve this question asked Nov 4, 2015 at 19:14 ckgckg 111 bronze badge
Add a comment  | 

2 Answers 2

Reset to default 2

This should be working:

Be sure that your DB prefix is "wp_"

Update wp_users set wp_users.user_login=wp_users.user_nicename where wp_users.user_login="x" 

To update the Nickname use:

UPDATE wp_users SET user_nicename = 'new_nick_name' WHERE user_nicename = 'x';

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745335006a4623061.html

相关推荐

  • query - My SQL function to change user_name

    My wordPress database was hacked and all users_names were changed to the same thing. I'd like to write a mySql quer

    8小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信