Log in

View Full Version : how can i change my userid??


khaleejy
01-28-2003, 03:28 PM
hi

lets say that the user of id 2 is banned, so userid 2 return to null
my user id is * and i want to take 2 as my userid

in another words: how can i change my userid from * to some emtpy id?? :rolleyes:

Xenon
01-28-2003, 03:49 PM
it's not as easy, because you have a lot of queries to be run:
UPDATE user SET userid=2 WHERE userid=*
UPDATE userfield SET userid=2 WHERE userid=*
UPDATE post SET userid=2 WHERE userid=*
UPDATE thread SET postuserid=2 WHERE postuserid=*
UPDATE privatemessage SET userid=2 WHERE userid=*
think i've forgotten some have i?

khaleejy
01-28-2003, 05:05 PM
thank you xenon

(think i've forgotten some have i?) well if you did then tell me what is it please.. i cant do any thing until im sure of what it will do?

Xenon
01-28-2003, 05:07 PM
well, just look into phpmyadmin and look which tables have a userid field, you have to update each of these tables :)

khaleejy
01-28-2003, 06:00 PM
xenon
is that right?


UPDATE access SET userid=2 WHERE userid=*
UPDATE adminlog SET userid=2 WHERE userid=*
UPDATE announcement SET userid=2 WHERE userid=*
UPDATE attachment SET userid=2 WHERE userid=*
UPDATE calendar_events SET userid=2 WHERE userid=*
UPDATE customavatar SET userid=2 WHERE userid=*
UPDATE moderator SET userid=2 WHERE userid=*
UPDATE pollvote SET userid=2 WHERE userid=*
UPDATE post SET userid=2 WHERE userid=*
UPDATE privatemessage SET userid=2 WHERE userid=*
UPDATE privatemessage SET touserid=2 WHERE touserid=*
UPDATE privatemessage SET fromuserid=2 WHERE fromuserid=*
UPDATE search SET userid=2 WHERE userid=*
UPDATE session SET userid=2 WHERE userid=*
UPDATE subscribeforum SET userid=2 WHERE userid=*
UPDATE subscribethread SET userid=2 WHERE userid=*
UPDATE thread SET postuserid=2 WHERE postuserid=*
UPDATE threadrate SET userid=2 WHERE userid=*
UPDATE user SET userid=2 WHERE userid=*
UPDATE useractivation SET userid=2 WHERE userid=*
UPDATE userfield SET userid=2 WHERE userid=*

Martin64
01-28-2003, 06:15 PM
Originally posted by khaleejy
xenon
is that right?


UPDATE access SET userid=2 WHERE userid=*
UPDATE adminlog SET userid=2 WHERE userid=*
UPDATE announcement SET userid=2 WHERE userid=*
UPDATE attachment SET userid=2 WHERE userid=*
UPDATE calendar_events SET userid=2 WHERE userid=*
UPDATE customavatar SET userid=2 WHERE userid=*
UPDATE moderator SET userid=2 WHERE userid=*
UPDATE pollvote SET userid=2 WHERE userid=*
UPDATE post SET userid=2 WHERE userid=*
UPDATE privatemessage SET userid=2 WHERE userid=*
UPDATE privatemessage SET touserid=2 WHERE touserid=*
UPDATE privatemessage SET fromuserid=2 WHERE fromuserid=*
UPDATE search SET userid=2 WHERE userid=*
UPDATE session SET userid=2 WHERE userid=*
UPDATE subscribeforum SET userid=2 WHERE userid=*
UPDATE subscribethread SET userid=2 WHERE userid=*
UPDATE thread SET postuserid=2 WHERE postuserid=*
UPDATE threadrate SET userid=2 WHERE userid=*
UPDATE user SET userid=2 WHERE userid=*
UPDATE useractivation SET userid=2 WHERE userid=*
UPDATE userfield SET userid=2 WHERE userid=*


I'm not Xenon, but yeah, that sounds like all. :nervous:

Xenon
01-28-2003, 06:38 PM
yes it's right :)

that's why i said i wouldn't do it, it just takes so long to find the right tables ;)

khaleejy
01-28-2003, 08:06 PM
it works great :) thanks to xenon and martin

by the way, any one know if vbulletin 3.0 changes will include some changes in the database tables??

Xenon
01-28-2003, 08:12 PM
some?

you can expect a lot changes....

/me fears the update of some hacks ^^

khaleejy
01-28-2003, 08:17 PM
even i :ermm: