PDA

View Full Version : Swapping USERID


CK
08-15-2011, 12:58 PM
I was advised via support to post for help here, I'll preface by saying that I'll be doing this on a backup as proof before trying anything on the board.

So I'm running vBulletin 4.1.5 and I would like to swap two existing USERID's. If anyone could advise of a step by step that I could try out I would be eternally grateful.

vbresults
08-15-2011, 02:06 PM
I misunderstood what you were trying to do; never mind.

CK
08-15-2011, 02:12 PM
Bugger, thank you anyway.

Videx
08-15-2011, 06:52 PM
You can't swap IDs, but you can change names. Swap names, swap IDs.

Agree you really need to tell us what you're trying to accomplish if you want a more meaningful answer.

CK
08-15-2011, 09:32 PM
You can't swap IDs, but you can change names. Swap names, swap IDs.

Agree you really need to tell us what you're trying to accomplish if you want a more meaningful answer.

Basically I'm not USERID 1.

I would like my username to be associated with USERID 1, so I need to swap everything I've ever posted to show up as USERID 1 and the member that had populated as USERID 1 I would like to swap to my current USERID.

I hope that makes sense :) I'm not very good at explaining.

Zachery
08-15-2011, 09:51 PM
Don't, its not worth the trouble.

CK
08-15-2011, 10:26 PM
Don't, its not worth the trouble.

I understand that's the general feeling but if it's all the same I would really appreciate it if someone would explain the steps I would take and I'll try it out on a backup of the DB.

DivisionByZero
08-15-2011, 10:53 PM
Do you have any idea what an undertaking that is?

First, you'll have to shut down the board (if it's a busy one), then wipe the caches and manually edit all sorts of fields in dozens of tables.

What's so important about being #1 anyway? What I do with my boards, when I install them, is.... just before the installation step where you enter the first user details (usually admin), I set the auto_increment to 1000001. Kinda like the facebook way.

Optionally, get vbseo and then nobody will see the parameters in the browser anyway.

CK
08-15-2011, 11:24 PM
Well I'm converting away from vBulletin in the next 2 weeks.

I have ran into problems with mods being hardcoded to have the admin set as 1, I'm just trying to cover all future bases.

I perhaps had the misguided idea that I would be able to run various SQL queries that would do the changing like black magic.

My database is backed up every 4/5 hours and it's never down for that so I don't perceive that to be an issue. This topic always seems to get smacked down, I've seen people post that they've done it but I've ever seen any step by step instructions.

BirdOPrey5
08-16-2011, 01:32 AM
I can't think of 1 mod hard coded to use userid 1 for anything, and if there was you shouldn't be using such a mod to begin with- god knows what other stupid things the coder may have done.

Have you considered merging your account into userid1 and then taking over the account?

kh99
08-16-2011, 03:04 AM
I don't disagree with anything anyone said above (specifically, I agree that it shouldn't be important enough to bother attempting it), but if you really want to play around, I was thinking this:

- create a temporary admin account with permissions to do what you need to do below, and log in to that account.
- create a new user that will become the current user 1's user
- merge user 1 to the new user (this deletes the current user 1)
- create a new user that will become your user 1 - note the id of this user
- go to the database and in tables user, userfield, and usertextfield (and administrator, if you made the new user in the previous step an admin), set userid = 1 where userid = the id from above.
- merge your current account to the user 1 account.
- delete the temporary admin account

I don't know how well this will work. The instructions for merging users says the "Posts, threads, calendar events, private messages, post count, reputation, contacts, friends and ignore list" will be merged, but I guess the profile information (and maybe other things I haven't thought about) will not be, so when you create the new users you probably want to copy as much of the profile info as you can. Also you'll have to give the displaced user 1 the new password you use when creating his new user.

Boofo
08-16-2011, 06:09 AM
I can't think of 1 mod hard coded to use userid 1 for anything, and if there was you shouldn't be using such a mod to begin with- god knows what other stupid things the coder may have done.

I have to say I totally agree with this statement. Any coder that hard-codes any mod to use userid 1 only, is doing something that is so far off the track, who knows what else they have done that will cause problems on down the line. I would avoid any mods like that as well as any coders that code something to that degree.

CK
08-16-2011, 06:14 AM
Thank you khpp, I'm going over your steps again and again in my head an I missing were do we keep the information of the user that currently resides as USERID1? :)

--------------- Added 1313478906 at 1313478906 ---------------

I have to say I totally agree with this statement. Any coder that hard-codes any mod to use userid 1 only, is doing something that is so far off the track, who knows what else they have done that will cause problems on down the line. I would avoid any mods like that as well as any coders that code something to that degree.

Remember foromail?

Boofo
08-16-2011, 07:10 AM
Remember foromail?

Nope, sorry, can't say as I remember that. Was that a mod on here?

kh99
08-16-2011, 10:46 AM
Thank you khpp, I'm going over your steps again and again in my head an I missing were do we keep the information of the user that currently resides as USERID1? :)

The first merge will move all "Posts, threads, calendar events, private messages, post count, reputation, contacts, friends and ignore list" of the current USERID1 to the first new user you create. To keep the profile information you would have to reproduce it yourself. Maybe have two windows open and so you could look at the USERID1 info while creating the new user.

I think you could probably do this more completely and automatically by writing a script because then you could copy all the profile information (but of course that means doing some php programming).

CK
08-16-2011, 02:34 PM
The first merge will move all "Posts, threads, calendar events, private messages, post count, reputation, contacts, friends and ignore list" of the current USERID1 to the first new user you create. To keep the profile information you would have to reproduce it yourself. Maybe have two windows open and so you could look at the USERID1 info while creating the new user.

I think you could probably do this more completely and automatically by writing a script because then you could copy all the profile information (but of course that means doing some php programming).

I shall give this a go now that I understand the process a bit better, bit of lateral thinking on your part, hats off to you everyone else has posted how complicated the whole process would be.

I'm going to give this a go tonight and will post back the results.

kh99
08-16-2011, 02:41 PM
I shall give this a go now that I understand the process a bit better, bit of lateral thinking on your part, hats off to you everyone else has posted how complicated the whole process would be.

Thanks, I just thought you should have some kind of answer to the original question if I could think of one. But in defense of everyone else, this probably will not turn out to be a perfect solution (i.e. one that the current USERID1 wouldn't notice).

CK
09-12-2011, 10:06 PM
Thanks, I just thought you should have some kind of answer to the original question if I could think of one. But in defense of everyone else, this probably will not turn out to be a perfect solution (i.e. one that the current USERID1 wouldn't notice).

All sorted now BTW look :D

http://www.the-sps.org/members/chemicalkicks.1/

YAY

BirdOPrey5
09-12-2011, 10:55 PM
All sorted now BTW look :D

http://www.the-sps.org/members/chemicalkicks.1/

YAY

Banned from vBulletin?

Videx
09-12-2011, 11:06 PM
Banned from vBulletin?I show his avatar and sig as an ad for Xenforo. I'd ban him too if he came on my forum advertising a competitor.

Not to mention it seems way off topic.

BirdOPrey5
09-12-2011, 11:50 PM
I show his avatar and sig as an ad for Xenforo. I'd ban him too if he came on my forum advertising a competitor.

Not to mention it seems way off topic.

LOL, didn't even notice...

Boofo
09-13-2011, 01:16 AM
Check out his real name and location.

ForceHSS
09-13-2011, 02:11 AM
was he not the one bad mouthing 911
just checked yes it was him good he was banned he should not of said what he said

--------------- Added 1315883930 at 1315883930 ---------------

should get banned from here as well if it was me i would close his isp for good

BirdOPrey5
09-13-2011, 10:43 AM
His political opinions are his own, and reflect on him. We are not going to ban someone for their political opinions however unpopular they may be. That said this thread has run its course and the original question was answered. Closing thread.