View Full Version : how to restore a deleted member ?
winky8300
02-07-2015, 07:21 AM
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 (https://vborg.vbsupport.ru/showthread.php?t=236861&page=7) but it is not usable, help please
I do not want to do a restore of the database
thank you
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:
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
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
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. :)
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:
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
Extremly helpful as always, Ozzy. Thanks man :up:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.