MyBB Community Forums

Full Version: Merge posts by guest with new account? [Happily Resolved]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I accidentally deleted a member during an anti-spam spree and so their post(s) are now on the db as by an 'Unregistered' user.

I know it is possible to merge two accounts, but is it possible to merge post(s) by this 'guest/unregistered' account to a new 'registered' account please?

ThanksBlush
Hmm... are there any posts that are by 'Unregistered' that weren't made by this user?? I.e. if something like this happened before and there are a few other 'Unregistered' posts.

We can reassign all the posts that are 'Unregistered' to this user but we wouldn't be able to tell what posts were theirs and what ones could have been made by somebody else, if you see what I mean.
(2010-08-07, 10:46 AM)flick Wrote: [ -> ]I accidentally deleted a member during an anti-spam spree and so their post(s) are now on the db as by an 'Unregistered' user.

I know it is possible to merge two accounts, but is it possible to merge post(s) by this 'guest/unregistered' account to a new 'registered' account please?

ThanksBlush

That would be possible as well. Run this query at your phpmyadmin

UPDATE mybb_posts SET uid = x WHERE username = 'deleted_user_username';

Replace x with the user id of the new registered user whom you want to attribute the posts of the deleted user and replace deleted_user_username with the username that your deleted user used to have before he deleted his account.

It will work. As it happens, I did it only yesterday at my own forum too for a couple of deleted users who came back.

If you want to restore back the deleted threads too, run this query

UPDATE mybb_threads SET uid = x WHERE username = 'deleted_user_username';

And replace accordingly the values as explained above. Also if your db tables use another prefix other than the default mybb_ then you should use that instead when running the queries.

Then go to your Admin Panel->Tools & Maintenance->Recount & Rebuild and run the first 4 options there.
Oh yeah, it still stores the username doesn't it.
@MattRogowski & Bubulang: Thank you for your help! I'm going to try out the phpMyadmin query method and hope I don't mess up further along the way - am so glad that MyBB stores usernames Big Grin
If you backup your database in the MyBB ACP or phpMyAdmin you'll be fine in case something goes wrong; not that this query should do anything it shouldn't just in general.
MattRogowski is right. You should make a backup first of your posts and threads table before running the queries, just in case.
Thank you both again! Heart

I saved a copy of the db using MyBB ACP to select the mybb_ tables, and have just finished following bubulang's guide step-by-step - everything is back to normal.

* flick is v. happy! Blush
(2010-08-07, 07:29 PM)flick Wrote: [ -> ]Thank you both again! Heart

I saved a copy of the db using MyBB ACP to select the mybb_ tables, and have just finished following bubulang's guide step-by-step - everything is back to normal.

* flick is v. happy! Blush

I am glad to hear that you got it back to normal. And thank you for the rep you gave me Smile
ok i mean thank you for sharing, but i dont know where to go to do this like where do i go to upldate it i cant even find th update and x y and all that so could you please please tell me stem by stem please......]

Thank yu