Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Renaming a member? (http://www.mysidiaadoptables.com/forum/showthread.php?t=5052)

tahbikat 02-29-2016 12:06 AM

Renaming a member?
 
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?

Kyttias 02-29-2016 02:29 AM

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.

tahbikat 02-29-2016 01:21 PM

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";


Hall of Famer 02-29-2016 03:01 PM

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.

tahbikat 03-14-2016 09:15 PM

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


All times are GMT -5. The time now is 01:15 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.