The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
!!!Deleted User on Accident!!! OMG!!!
Oh wow... I really messed up
I accidentally deleted a user from a drop down box when thinking I was about to edit. Curse all the confirm boxes we must click in our IT lives.. Makes them almost pointless because I am so prone to just click it... Ugh!!! Well anyway.. I deleted one of my mods.. All his posts are still there as him but appear as a guest.. (no links on username, etc) So damn.. Please tell me I can import his user, posts, etc back into my site with a restore.. Only problem there is I havent backed up in several weeks. I dont want to lose several weeks just for a single user restore... PLEASE PLEASE PLEASE!!! Someone tell me I am not screwed!!! |
#2
|
|||
|
|||
You are screwed.
You can not restore just 1 user. The best you can do is: - Create a new user for him and setup as usual. Make a note of the new userid. - Run the following queries to bring back the threads and posts to his new acount (create backup before doing so!!!!!), replacing the correct username and userid (this assumes you will reregister him with the same name): SQL Query: (how to run queries) UPDATE post set userid = NEW_USERID WHERE username = 'OLD_USERNAME'; SQL Query: (how to run queries) UPDATE thread set postuserid = NEW_USERID WHERE postusername = 'OLD_USERNAME'; |
#3
|
||||
|
||||
Quote:
This is what I did and I THINK I may be pretty good considering my boneheaded move.. I recreated a user with the same username.. Went into the database and changed his new user to have the old ID.. Thankfully I had a page open with a link of his name so I didnt have to figure it out. Once I did that, some of the hacks I have linked right back up his profile.. Ribbons, Gifts... Stuff like that... I have never pruned or manually set post count so I am rebuilding that now.. I guess I could have just manually put in his posts since I knew what it was (again from that page I had open).. I am thinking I might be good on most counts.. Any thoughts? |
#4
|
|||
|
|||
Quote:
|
#5
|
||||
|
||||
Looks like the threads actually deleted the uid that posted it... Still looks 'guestish'..
I don't allow guests to post on my site.. So maybe I could actually run a query to change every threadid that doesn't have a username to change to his?? If I have to plug in his posts the next time I may have to do a post rebuild, I guess I can live with that too.. But if anyone has any ideas, I am all ears --------------- Added [DATE]1194695646[/DATE] at [TIME]1194695646[/TIME] --------------- Quote:
--------------- Added [DATE]1194695924[/DATE] at [TIME]1194695924[/TIME] --------------- Actually.. Sorry to be chatty, but couldnt I actually still use your queries with my current situation and just treat his old uid as NEW_USERID since I manually changed it? --------------- Added [DATE]1194696718[/DATE] at [TIME]1194696718[/TIME] --------------- You are the man!!! I did a backup.. I was confident in your queries.... UPDATE post set userid = NEW_USERID WHERE username = 'OLD_USERNAME'; I did just make the newuserid his old one. This query fixed everything.. I looked at the thread set.. It actually keeps the userid in the threadsets.. So I didnt have to run that one.. Thank you so much for your help!!! All seems good now |
#6
|
||||
|
||||
Quote:
|
#7
|
|||
|
|||
Thanks, Marco! I hope i´ll never come into a situation tu use your solution, but i think you should migrate this into the vb manual as well!
|
#8
|
|||
|
|||
doubt this will ever make it to he manual. We do not advertise running manual queries. Also using the information in an older thread could be dangerous. Things might have changed between versions or the solution might not apply to the new problem.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|