• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Restore Deleted Users?

faeronsayn

Well-known member
#1
Is it possible to restore deleted users by any chance? Possibly from another database?

What happens to their posts when a user is deleted? Can I simply merge two tables?
 

Dodgeboard

Well-known member
#2
There's really no easy way to do this. If you restore from a database, you will lose all recent posts. You cannot easily extract one user from a database backup to restore to an online database, that I know of. As far as what happens to a deleted users posts/threads, they become guest posts.
 

faeronsayn

Well-known member
#3
What if I tried to import these posts to a database that already had the user. Would the guests posts turn back to normal or no?
 

Dodgeboard

Well-known member
#4
What if I tried to import these posts to a database that already had the user. Would the guests posts turn back to normal or no?
That's a good question, but I would guess that the association between the user and the posts would be lost after the user was deleted.
 

faeronsayn

Well-known member
#5
That's a good question, but I would guess that the association between the user and the posts would be lost after the user was deleted.
Maybe it's a simple display thing? What if the post still has the user ID in the database?

I believe that's how threads are currently handled when nodes are deleted, threads still exist with the node_ids intact.
 

faeronsayn

Well-known member
#7
I've read your post, the way I am doing is very crude and really messy lol.

What I did was (I was hacked) so I recreated the users, and then updated all of their user_ids in the xf_post tables and pretty much all other tables that had their information.

Their posts still contain their user_IDs, and pretty much all other tables that contain their information have their user_ids intact so you can potentially restore them back to normal. I did notice that their statuses were gone (maybe I missed something).

Got a lot of help from Jake Bunce.