Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2015, 07:21 AM
winky8300 winky8300 is offline
 
Join Date: May 2008
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default how to restore a deleted member ?

hello
I accidentally deleted a very important member, but his subjects are here , Can someone help me so that his subjects may not be "guest"?
I found this mod but it is not usable, help please
I do not want to do a restore of the database
thank you
Reply With Quote
  #2  
Old 02-07-2015, 09:21 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can't restore a deleted user, when you delete a user using the admincp it's physically deleting the user from the database.

However, I believe the username of the user is still present in the post table? Need someone to confirm this to me, if I'm right then your option would be this: create a new user and write down the userid. Execute an UPDATE query in the post table to set the userid of the entries with the new userid where the userid is 0 and the username is the old username.
Reply With Quote
  #3  
Old 02-07-2015, 09:33 AM
SaN-DeeP's Avatar
SaN-DeeP SaN-DeeP is offline
 
Join Date: Jun 2002
Location: Mumbai, India
Posts: 1,195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

winky8300,
You want a restore a specific member ID or membername ?

Dave,
I have tried requesting about this in past..
But according to many X developers.. restoring a user id will be problematic as references for same are stored in many places..

But I will wait to hear, if this works..
Reply With Quote
  #4  
Old 02-07-2015, 09:42 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First take another backup, but make sure not to overwrite your old one.

You can register a new account for that user, then run this query to associate the old posts with the new account:

Code:
UPDATE post SET userid='xxx' WHERE username='Old Name';
....with 'xxx' being the userid of the new account.

Then update the thread and forum counters in that order:

Admin CP -> Maintenance -> Update Counters
Reply With Quote
2 благодарности(ей) от:
Kane@airrifle, Marv
  #5  
Old 02-07-2015, 09:58 AM
winky8300 winky8300 is offline
 
Join Date: May 2008
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello

thank you for your answers my friends

Quote:
First take another backup, but make sure not to overwrite your old one.

You can register a new account for that user, then run this query to associate the old posts with the new account:

Code:

UPDATE post SET userid='xxx' WHERE username='Old Name';

....with 'xxx' being the userid of the new account.

Then update the thread and forum counters in that order:

Admin CP -> Maintenance -> Update Counters
hello ozzy47


I run the query with phpmyadmin? because I do my backup with mysqldumper
Reply With Quote
  #6  
Old 02-07-2015, 10:01 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

phpmyadmin or right in the ACP.

I have never had the need to do this, so make sure everything works, if not, restore your backup.
Reply With Quote
  #7  
Old 02-07-2015, 10:08 AM
winky8300 winky8300 is offline
 
Join Date: May 2008
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
phpmyadmin or right in the ACP.

I have never had the need to do this, so make sure everything works, if not, restore your backup.
do not worry

when I try to run a sql query via my acp, he says I'm not allowed to do so:erm:
Reply With Quote
  #8  
Old 02-07-2015, 10:11 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to add your userid to the can run queries in the includes/config.php file.
Reply With Quote
  #9  
Old 02-07-2015, 10:13 AM
winky8300 winky8300 is offline
 
Join Date: May 2008
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, thank you for your patience
Reply With Quote
  #10  
Old 02-07-2015, 10:20 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not a problem.
Reply With Quote
Благодарность от:
winky8300
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:03 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04894 seconds
  • Memory Usage 2,258KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete