The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Im developing an administrator backend system for a website. I would like to incorporate the excellent vB into this system to allow admins to post messages and communicate with each other privately. Now the problem I have is that I already use a table which holds usernames / passwords and the vB has the user table which basically does the same thing. I would like to extend the use of the user table to cover data storage of my system so that the usernames / passwords are universal.
So I guess what I need to know is? 1) Can I add new fields to the user table without causing the vB to screw up!!! 2) Can I simply add and delete records (users) from the user table as I like or do I have to add, delete, or alter any linked records in other tables? If anyone else has done any work along a similar line I would be very interested to here from you. Any help you can provide with this will be greatly appreciated. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You can definitely add fields to the user table; however make sure you give them descriptive names so there's less chance of duplicating a future vB column name.
When deleting a user, you should run the following queries: DELETE * FROM user WHERE userid='XX'; DELETE * FROM privatemessage WHERE touserid='XX'; DELETE * FROM access WHERE userid='XX'; DELETE * FROM customavatar WHERE userid='XX'; DELETE * FROM calendar WHERE userid='XX' and public='0'; DELETE * FROM moderator WHERE userid='XX'; DELETE * FROM userfield WHERE userid='XX'; DELETE * FROM subscribeforum WHERE userid='XX'; DELETE * FROM subscribethread WHERE userid='XX'; If you want to delete all posts by the user: DELETE * FROM post WHERE userid='XX'; DELETE * FROM attachment WHERE userid='XX'; If you want to delete all poll votes by the user: DELETE * FROM pollvote WHERE userid='XX'; If you want to delete all threads started by the user: DELETE * FROM thread WHERE postuserid='XX'; |
|
#3
|
|||
|
|||
|
Thanx tubedogg. Thats of great help.
If I was to simply delete a user from the "user" table without removing their posts / private messages etc, would this cause any problems to the vB? |
|
#4
|
|||
|
|||
|
Well I've played around and so far so good it all seems to be working together nicely...
Just for reference I think it's... DELETE FROM table WHERE field='XX'; Rather than... DELETE * FROM table WHERE field='XX'; And calendar = calendar_events |
![]() |
|
|