how to rename a user

Need help? Post your questions here.

Moderator: moderators

how to rename a user

Postby supra92 » Sun Aug 19, 2012 9:52 pm

Forum search turned up nothing, so here goes...

Is there any way to rename a user in SS? I hit up the ../db.view page and took a look at all the tables in the database, and it seems like this is not going to be an easy thing to do. In most database, there's a user table where every user has an ID associated, and then in all other database tables to which users are tied, the user_ID is used.

Not so in Subsonic, evidently. In the USER table, there's username, password, email, and then various pieces of internal data. But no user_id. And sure enough, in other tables like USER_SETTINGS, the full username is again the main column, not an ID.

Does this mean that one has to go change the username, manually via SQL, in all relevant SS tables in the database? If so, what are all those tables? I'm seeing the username as the main column in USER, USER_SETTINGS, CUSTOM_AVATAR, and even PLAYER. Seems like a lot of things could go wrong if one happens to miss a table. And there's definitely no GUI way to do this that I can see, within SS itself.

The reason I'd like to change the username, rather than simply create a new one, is to save various things like user history, amount uploaded/downloaded, etc.

Has anyone ever tried to do this, or have ideas? The best I can come up with is simply to manually plow through every single table that comes up from: SELECT * FROM INFORMATION_SCHEMA.SYSTEM_TABLES, and then update the username in every single table where it appears. But I still can't shake the feeling that something might break anyways.

Regards,
Supra92
User avatar
supra92
 
Posts: 137
Joined: Sun Nov 19, 2006 12:17 am
Location: Central Texas

Re: how to rename a user

Postby BKKKPewsey » Mon Aug 20, 2012 12:21 am

If you create a new user (with the changed name) you can then copy the data over from the old to the new name.
I would think there is less chance to have any mishaps that way :roll:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: how to rename a user

Postby hakko » Mon Aug 20, 2012 5:53 am

I agree with BKKKPewsey. This topic might be of slight interest: viewtopic.php?f=2&t=9854#p43339. I wonder why Sindre hates foreign keys so much.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: how to rename a user

Postby GJ51 » Tue Aug 21, 2012 2:10 am

Xenophobia.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York


Return to Help

Who is online

Users browsing this forum: No registered users and 21 guests