Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2008, 05:46 PM
dataman dataman is offline
 
Join Date: Oct 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Restore Deleted User

Last night a member was deleted via ACP. Since then, we've reconciled and I tried to add the user back.
I went to the last good database backup, and found the SQL command to insert the USER row. I edited it to make sure it would insert only the one user, and copied it into PHP_MYADMIN. I ran the SQL and it inserted the USER record just fine. The user is now able to log in to our forum just fine.
The problem is, all past posts are showing 'guest' next to her name. Also, in ACP, the user is showing in user lists, but when I hover over the name, the action string at the bottom shows 'u=' where it should be 'u=10'.
Yes, her userid field in the USER table shows 10.
How do I fix this?
Reply With Quote
  #2  
Old 12-17-2008, 06:08 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Users are added in more than just the user table. I think there are two other tables they use - userfield and usertextfield.
Reply With Quote
  #3  
Old 12-17-2008, 06:31 PM
dataman dataman is offline
 
Join Date: Oct 2008
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne,
You rock!!!!!! That did it. I simply inserted rows in those 2 tables and all is fixed. Thanks!!!!
Reply With Quote
  #4  
Old 06-21-2009, 05:55 AM
USAMustangs.com USAMustangs.com is offline
 
Join Date: Mar 2007
Location: D/FW, Texas
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could someone write out a simplified step by step on this? I have the same issue.
Reply With Quote
  #5  
Old 06-21-2009, 03:02 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by USAMustangs.com View Post
Could someone write out a simplified step by step on this? I have the same issue.
There are many posts over on vb.com dealing with running a query to change 'guest' posts back to user posts. They have step-by-step instructions over there.
Reply With Quote
  #6  
Old 06-21-2009, 10:03 PM
USAMustangs.com USAMustangs.com is offline
 
Join Date: Mar 2007
Location: D/FW, Texas
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
There are many posts over on vb.com dealing with running a query to change 'guest' posts back to user posts. They have step-by-step instructions over there.
Thanks for the suggestion.

I found this thread http://www.vbulletin.com/forum/showthread.php?t=282868

And I just wanted to confirm that there is no way to restore a deleted user? And that you have to recreate the user then use the suggested steps to transfer the post count to recreated user?

I just wanted be sure before I attempted it. If someone could let me know I sure would appreciate it.

Thanks.
Reply With Quote
  #7  
Old 06-22-2009, 03:40 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by USAMustangs.com View Post
Thanks for the suggestion.

I found this thread http://www.vbulletin.com/forum/showthread.php?t=282868

And I just wanted to confirm that there is no way to restore a deleted user? And that you have to recreate the user then use the suggested steps to transfer the post count to recreated user?

I just wanted be sure before I attempted it. If someone could let me know I sure would appreciate it.

Thanks.
Correct - there is no way to restore a deleted user. You should do what Steve suggested in that thread.
Reply With Quote
  #8  
Old 06-22-2009, 06:20 PM
Aclikyano Aclikyano is offline
 
Join Date: Apr 2006
Posts: 481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh good thing 4 ya backup, thats alot of trouble 2 go thru for a deleted member lol
i woulda told em too late, make a new name....but i never delete users like that
Reply With Quote
  #9  
Old 06-23-2009, 12:06 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wrote a member undeleter script for vb 3... we had an admin back then who accidentally deleted a few users. Doubt it'd still work for 3.8 esp as it was based off code for vb2 which was used to change someones userid.

I did notice this: https://vborg.vbsupport.ru/showthread.php?t=147378 in the similar threads box thou
Reply With Quote
  #10  
Old 08-04-2011, 03:06 AM
bulbasnore bulbasnore is offline
 
Join Date: Dec 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

grep'd the insert commands for the numeric userid out of the backups of

user
userfield
usertextfield

If you don't know how to do that, without further explanation, you are in danger of wrecking your database, so instead make a new user though admincp for this person.

Either way, at this point you now have a new user with a numeric userid, so follow this query:

UPDATE post SET userid='newusersid' WHERE username='exusername';

newuserid is the numeric userid of the user
exusername is the EXACT string for the deleted user's username
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:24 PM.


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.05359 seconds
  • Memory Usage 2,245KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete