MyBB Community Forums
Recover a deleted account - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: Recover a deleted account (/thread-89055.html)

Pages: 1 2


Recover a deleted account - Stely - 2011-02-24

Is there a way to recover a deleted account? A shitty admin just deleted it and it had over 2000 posts.

I don't want to use backup.


RE: Recover a deleted account - Yaldaram - 2011-02-24

You'll have to reassign the old posts to the new account; the only thing to go by once the account is deleted, is the username though. So you want UPDATE mybb_threads/posts SET uid=123 WHERE uid=0 AND username='Oldname' or something like that. And then Recount&Rebuild all counters.

If there were guests who at one point used the same name as the registered user, the guest posts will also be assigned to the user though.

The alternative is selectively restoring the users old data from a backup file.

Either way you'll have to do that manually and you should know a little SQL to do that. Make a backup before you break your forum with a bad SQL command.


RE: Recover a deleted account - Stely - 2011-02-25

Can you detail the first option?


RE: Recover a deleted account - Alan S. - 2011-02-25

Create a new account for the deleted member, then run these queries in phpMyAdmin:

UPDATE `mybb_threads` SET `uid` = 'X' WHERE `username` = 'Y';
UPDATE `mybb_posts` SET `uid` = 'X' WHERE `username` = 'Y';

Where X is the new account ID and Y is the old username.

Then go to ACP >> Tools & Maintenance >> Recount & Rebuild and rebuild/recount the first 4 options.


RE: Recover a deleted account - Steven - 2011-02-25

(2011-02-25, 04:52 PM)AJS Wrote: Create a new account for the deleted member, then run these queries in phpMyAdmin:

UPDATE `mybb_threads` SET `uid` = 'X' WHERE `username` = 'Y';
UPDATE `mybb_posts` SET `uid` = 'X' WHERE `username` = 'Y';

Where X is the new account ID and Y is the old username.

Then go to ACP >> Tools & Maintenance >> Recount & Rebuild and rebuild/recount the first 4 options.

Er, simply merge the users. ACP -> Users & Groups -> Merge Users.


RE: Recover a deleted account - pyridine - 2011-02-26

Um, you can't merge a user if it's deleted...


RE: Recover a deleted account - Steven - 2011-02-26

(2011-02-26, 12:28 AM)pyridine Wrote: Um, you can't merge a user if it's deleted...

Oh, right. Carry on... Toungue

/logic fail


RE: Recover a deleted account - StrikerMan780 - 2013-04-22

Can someone please make a plugin that can automate this process? Me being a worthless and stupid dumbass, I deleted 11 users off my forum accidentally.. and I have no goddamn backup... :\


RE: Recover a deleted account - GamingCave - 2014-09-20

Could anyone help with this issue on 1.8 I've tired running the above with the correct info to no avil.
Edit never I figured it out.


RE: Recover a deleted account - mwforum - 2014-12-11

I would also like to know how to do this. I have a member who left and asked that his membership be deleted but we kept his posts and now he's back and I'd like to merge his old posts with his new posts.

Thanks.