Merges 'guest' posts to an actual user account?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KW802
    Senior Member
    • Jul 2003
    • 1165
    • 3.8.11

    Merges 'guest' posts to an actual user account?

    To make a long story short... on a 3.6.8 site some user accounts were removed by accident (no, not by me! ).

    The posts from those users now appears as guest posts with the old account name listed. When those user accounts are recreated, is it possible to merge the old orphaned posts back to their real new account?

    Or is there an easy way of finding out which userID is associated to those now orphaned posts? If so, could I then create the new accounts and just manually changed their PKID in the user table back to what the old one was?
    [URL="http://coolscifi.com"]Cool Sci-Fi[/URL="http://coolscifi.com"] | [URL="http://awalkerbit.me"]Walking Dead[/URL="awalkerbit.me"]
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    If posts are showing up as created byguests then they have the userid of 0.

    You would have to run a query based on username matching to assign those posts to the new user account.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • KW802
      Senior Member
      • Jul 2003
      • 1165
      • 3.8.11

      #3
      Originally posted by Wayne Luke
      If posts are showing up as created byguests then they have the userid of 0.
      {Looking through the post table...} Ooh, I see that now. It left the username but changed the userid to 0.

      Originally posted by Wayne Luke
      You would have to run a query based on username matching to assign those posts to the new user account.
      Working on it now.

      Thanks,
      Kevin
      [URL="http://coolscifi.com"]Cool Sci-Fi[/URL="http://coolscifi.com"] | [URL="http://awalkerbit.me"]Walking Dead[/URL="awalkerbit.me"]

      Comment

      • Knightmane
        Member
        • Mar 2007
        • 35
        • 4.2.X

        #4
        I was needing this information myself for my board. Unfortunately, I cannot find the solution given here in this thread in our board's AdminCP. Where should I be looking to apply the solution? I asked about this on the other board, but didn't get any answers... so I'll repost what I asked here.



        How do I "Merge orphaned threads and/or posts from a deleted member into a newly registered member"?

        Here is the situation/scenario:

        "A board member who had a substantial amount of posts accidentally removed himself from the board but his posts are not removed and still exist. He rejoined the board and asked the board owner if he could have his currently orphaned threads/posts merged into his new active account so he doesn't have to recreate every thread and post he has ever made."

        Is there a way to do this? And if so, what is the detailed method for doing it?

        Comment

        • KW802
          Senior Member
          • Jul 2003
          • 1165
          • 3.8.11

          #5
          Knightmane,

          After the new user account is created find the new userID for the account. For the sake of example, let's assume that the new userID is 123. Let's also assume that the old username on the account that was deleted was Fuzzy. Those are the two big pieces of data... the old username and the new userID.

          After that issue a MySQL query like the following...
          Code:
          update post
          set userid="123"
          where (username = "fuzzy" and userid = "0");
          If your account has the proper permissions then you can issue that from the ACP (ACP => Maintenance => Execute SQL Query) otherwise you'll need to do it using phpSQLAdmin or other MySQL tool.

          Just be very careful! Executing the query using the wrong values could totally mess up the wrong account.

          Once you're done with that you will still have one more problem... the new account will not show the correct number of posts yet. Let's say the old account had 100 posts and the new account had only 10 posts before you ran the query. The new account will remain at 10.

          To fix that run... ACP => Maintenance => Update Counter => Update Post Counts

          Before you run that Update Post Counts command though, make sure you read the description of it in the ACP carefully before hitting the button. The results it produces may not be worth it for just one account.
          [URL="http://coolscifi.com"]Cool Sci-Fi[/URL="http://coolscifi.com"] | [URL="http://awalkerbit.me"]Walking Dead[/URL="awalkerbit.me"]

          Comment

          • Knightmane
            Member
            • Mar 2007
            • 35
            • 4.2.X

            #6
            Issue resolved. Thanks to everyone who lent a suggestion. Especially to Lynne (on vBulletin.org) and KW802 (here).

            Comment

            • F4Flake
              Member
              • Jan 2008
              • 63
              • 3.6.x

              #7
              Just had to do this myself, after an admin deleted a member instead of modifying his status.

              Excellent. Worked like a charm.

              Comment

              • graham_w
                Member
                • Apr 2005
                • 35
                • 4.0.0

                #8
                Originally posted by KW802
                Knightmane,

                After the new user account is created find the new userID for the account. For the sake of example, let's assume that the new userID is 123. Let's also assume that the old username on the account that was deleted was Fuzzy. Those are the two big pieces of data... the old username and the new userID.

                After that issue a MySQL query like the following...
                Code:
                update post
                set userid="123"
                where (username = "fuzzy" and userid = "0");
                If your account has the proper permissions then you can issue that from the ACP (ACP => Maintenance => Execute SQL Query) otherwise you'll need to do it using phpSQLAdmin or other MySQL tool.

                Just be very careful! Executing the query using the wrong values could totally mess up the wrong account.

                Once you're done with that you will still have one more problem... the new account will not show the correct number of posts yet. Let's say the old account had 100 posts and the new account had only 10 posts before you ran the query. The new account will remain at 10.

                To fix that run... ACP => Maintenance => Update Counter => Update Post Counts

                Before you run that Update Post Counts command though, make sure you read the description of it in the ACP carefully before hitting the button. The results it produces may not be worth it for just one account.
                Old post but this saved me - thanks!

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...