vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   how can i change my userid?? (https://vborg.vbsupport.ru/showthread.php?t=48253)

khaleejy 01-28-2003 03:28 PM

how can i change my userid??
 
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:
[sql]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=*[/sql]
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?

PHP Code:

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

Quote:

Originally posted by khaleejy
xenon
is that right?

PHP Code:

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:


All times are GMT. The time now is 12:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02988 seconds
  • Memory Usage 1,750KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete