Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-29-2016, 12:06 AM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 49,677
tahbikat is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 02-29-2016, 02:29 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,444
Kyttias is on a distinguished road
Default

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?

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.
Reply With Quote
  #3  
Old 02-29-2016, 01:21 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 49,677
tahbikat is on a distinguished road
Default

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";
Reply With Quote
  #4  
Old 02-29-2016, 03:01 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,134
Hall of Famer is on a distinguished road
Default

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.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 03-14-2016, 09:15 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 49,677
tahbikat is on a distinguished road
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:28 PM.

Currently Active Users: 9811 (0 members and 9811 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636