Current time: 07-30-2014, 03:04 AM Hello There, Guest! (LoginRegister)


[How To?] Merge posts by guest with new account? [Happily Resolved]
08-07-2010, 10:46 AM (This post was last modified: 08-07-2010 07:31 PM by flick.)
Post: #1
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago Merge posts by guest with new account? [Happily Resolved]
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

Current motto: Cross referencing threads by providing links is a good idea!
Back-on Online - Back-on Fansite
http://www.backon-online.com/

WordPress Snippets
http://www.wpsnippets.com/
Visit this user's website Find all posts by this user
08-07-2010, 12:24 PM
Post: #2
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
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.

Can you still feel the butterflies?

Free never tasted like pudding.
Visit this user's website Find all posts by this user
08-07-2010, 02:47 PM (This post was last modified: 08-07-2010 02:49 PM by bubulang.)
Post: #3
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
(08-07-2010 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

PHP Code:
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

PHP Code:
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.

My plugins
Find all posts by this user
08-07-2010, 05:42 PM
Post: #4
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
Oh yeah, it still stores the username doesn't it.

Can you still feel the butterflies?

Free never tasted like pudding.
Visit this user's website Find all posts by this user
08-07-2010, 07:19 PM
Post: #5
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
@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

Current motto: Cross referencing threads by providing links is a good idea!
Back-on Online - Back-on Fansite
http://www.backon-online.com/

WordPress Snippets
http://www.wpsnippets.com/
Visit this user's website Find all posts by this user
08-07-2010, 07:22 PM
Post: #6
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
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.

Can you still feel the butterflies?

Free never tasted like pudding.
Visit this user's website Find all posts by this user
08-07-2010, 07:26 PM
Post: #7
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
MattRogowski is right. You should make a backup first of your posts and threads table before running the queries, just in case.

My plugins
Find all posts by this user
08-07-2010, 07:29 PM
Post: #8
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
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

Current motto: Cross referencing threads by providing links is a good idea!
Back-on Online - Back-on Fansite
http://www.backon-online.com/

WordPress Snippets
http://www.wpsnippets.com/
Visit this user's website Find all posts by this user
08-07-2010, 07:31 PM (This post was last modified: 08-07-2010 07:31 PM by bubulang.)
Post: #9
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account?
(08-07-2010 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

My plugins
Find all posts by this user
06-22-2011, 11:30 AM
Post: #10
Solved: 3 Years, 9 Months, 3 Weeks, 6 Days, 13 Hours, 6 Seconds ago RE: Merge posts by guest with new account? [Happily Resolved]
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
Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication