Announcement

Collapse
No announcement yet.

Merges 'guest' posts to an actual user account?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • graham_w
    replied
    Originally posted by KW802 View Post
    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!

    Leave a comment:


  • F4Flake
    replied
    Just had to do this myself, after an admin deleted a member instead of modifying his status.

    Excellent. Worked like a charm.

    Leave a comment:


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

    Leave a comment:


  • KW802
    replied
    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.

    Leave a comment:


  • Knightmane
    replied
    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?

    Leave a comment:


  • KW802
    replied
    Originally posted by Wayne Luke View Post
    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 View Post
    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

    Leave a comment:


  • Wayne Luke
    replied
    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.

    Leave a comment:


  • KW802
    started a topic Merges 'guest' posts to an actual user account?

    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?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X