#1
|
||||
|
||||
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? |
#2
|
||||
|
||||
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"; This doesn't cover forum stuff, however.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. |
#3
|
||||
|
||||
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"; |
#4
|
||||
|
||||
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`)
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
||||
|
||||
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... Her forum account works fine. EDIT: Nvm! She managed to reset her password so I think it's okay lol Last edited by tahbikat; 03-15-2016 at 05:22 AM. |
|
|
What's New? |
What's Hot? |
What's Popular? |