Renaming a member?

Forum
Last Post
Threads / Messages

tahbikat

Member
Member
Joined
Feb 11, 2014
Messages
408
Points
16
Age
30
Location
Louisiana
Mysidian Dollar
32,360
How can I easily rename a member? I saw there's a name item, but I'm not sure if it even works since I saw in the items function file it's kinda blank. I'll go ahead and test it out anyway though.

But wouldn't it just be replacing the member's current name for the one they choose?

Could I manually inject a few SQL queries into the database for the tables that have member names? I'm not sure how the queries would have to be formatted and I'm scared to experiment. :< Anyone know?
 
I think this is all:
Code:
UPDATE `adopts_friend_requests` SET `fromuser` = "NEW_USERNAME_HERE" WHERE `fromuser` = "OLD_USERNAME_HERE";
UPDATE `adopts_friend_requests` SET `touser` = "NEW_USERNAME_HERE" WHERE `touser` = "OLD_USERNAME_HERE";

UPDATE `adopts_inventory` SET `owner` = "NEW_USERNAME_HERE" WHERE `owner` = "OLD_USERNAME_HERE";

UPDATE `adopts_messages` SET `fromuser` = "NEW_USERNAME_HERE" WHERE `fromuser` = "OLD_USERNAME_HERE";
UPDATE `adopts_messages` SET `touser` = "NEW_USERNAME_HERE" WHERE `touser` = "OLD_USERNAME_HERE";

UPDATE `adopts_online` SET `username` = "NEW_USERNAME_HERE" WHERE `username` = "OLD_USERNAME_HERE";
UPDATE `adopts_owned_adoptables` SET `owner` = "NEW_USERNAME_HERE" WHERE `owner` = "OLD_USERNAME_HERE";

UPDATE `adopts_trade` SET `sender` = "NEW_USERNAME_HERE" WHERE `sender` = "OLD_USERNAME_HERE";
UPDATE `adopts_trade` SET `recipient` = "NEW_USERNAME_HERE" WHERE `recipient` = "OLD_USERNAME_HERE";

UPDATE `adopts_users` SET `username` = "NEW_USERNAME_HERE" WHERE `username` = "OLD_USERNAME_HERE";
UPDATE `adopts_users_contacts` SET `username` = "NEW_USERNAME_HERE" WHERE `username` = "OLD_USERNAME_HERE";
UPDATE `adopts_users_options` SET `username` = "NEW_USERNAME_HERE" WHERE `username` = "OLD_USERNAME_HERE";
UPDATE `adopts_users_profile` SET `username` = "NEW_USERNAME_HERE" WHERE `username` = "OLD_USERNAME_HERE";
UPDATE `adopts_users_status` SET `username` = "NEW_USERNAME_HERE" WHERE `username` = "OLD_USERNAME_HERE";

UPDATE `adopts_visitor_messages` SET `fromuser` = "NEW_USERNAME_HERE" WHERE `fromuser` = "OLD_USERNAME_HERE";
UPDATE `adopts_visitor_messages` SET `touser` = "NEW_USERNAME_HERE" WHERE `touser` = "OLD_USERNAME_HERE";

UPDATE `adopts_vote_voters` SET `username` = "NEW_USERNAME_HERE" WHERE `username` = "OLD_USERNAME_HERE";

HoF, could you double check that we aren't missing any? :ohnoes:

This doesn't cover forum stuff, however.
 
Thank you so much! Exactly what I needed. I found a few more needing to be included, like adopts_folders_messages and adopts_pounds. There might've been one more I'm forgetting about because I didn't need to include it since the member wasn't in it lol.

For the forum, in case anyone else needs this, these are the only tables I think that needed to be included. Luckily most of them just store the user's ID:

Code:
UPDATE `mybb_forums` SET `lastposter` = "newname" WHERE `lastposter` = "oldname";

UPDATE `mybb_threads` SET `username` = "newname" WHERE `username` = "oldname";
UPDATE `mybb_threads` SET `lastposter` = "newname" WHERE `lastposter` = "oldname";

UPDATE `mybb_users` SET `username` = "newname" WHERE `username` = "oldname";
 
There are also columns from four tables that you may need to change too:

Code:
table prefix_folder_messages: two columns(`fromuser`, `touser`)
table prefix_pounds: three columns(`firstowner`, `lastowner`, `currentowner`)
table prefix_promocodes: one column(`user`) 
table prefix_shoutbox: one column(`user`)

Anyway changing username is an extremely tedious process and Id definitely not recommend you to do this unless you have a good reason. And just like Kyttias mentioned, you also need to keep track of your username from your forum database if you have forum integration, which I cannot help you since I know little about MyBB's table structure other than its users table.
 
Huhh..

My member whose name I changed (with help from this thread) can't login to her account after logging out. The error message she gets is that the password is wrong or not related to the account. Was there something I missed that's causing this? I wonder if changing her username back to the original would fix it... :desudesudesu:

Her forum account works fine.

EDIT: Nvm! She managed to reset her password so I think it's okay lol
 
Last edited:

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top