MyBB Community Forums

Full Version: Recover a deleted account
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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.
Can you detail the first option?
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.
(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.
Um, you can't merge a user if it's deleted...
(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
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... :\
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.
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.
Pages: 1 2