vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   how to restore a deleted member ? (https://vborg.vbsupport.ru/showthread.php?t=317195)

winky8300 02-07-2015 07:21 AM

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

Dave 02-07-2015 09:21 AM

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.

SaN-DeeP 02-07-2015 09:33 AM

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..

ozzy47 02-07-2015 09:42 AM

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

winky8300 02-07-2015 09:58 AM

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

ozzy47 02-07-2015 10:01 AM

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.

winky8300 02-07-2015 10:08 AM

Quote:

Originally Posted by ozzy47 (Post 2536519)
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:p

when I try to run a sql query via my acp, he says I'm not allowed to do so:erm:

ozzy47 02-07-2015 10:11 AM

You need to add your userid to the can run queries in the includes/config.php file.

winky8300 02-07-2015 10:13 AM

ok, thank you for your patience

ozzy47 02-07-2015 10:20 AM

Not a problem. :)


All times are GMT. The time now is 01:46 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.01074 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete