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

Restore Deleted Users?

Discussion in 'XenForo Questions and Support' started by faeronsayn, Apr 2, 2013.

  1. faeronsayn

    faeronsayn Well-Known Member

    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?
  2. Dodgeboard

    Dodgeboard Well-Known Member

    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 likes this.
  3. faeronsayn

    faeronsayn Well-Known Member

    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?
  4. Dodgeboard

    Dodgeboard Well-Known Member

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

    faeronsayn Well-Known Member

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

    erich37 Well-Known Member

  7. faeronsayn

    faeronsayn Well-Known Member

    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.

Share This Page