Announcement

Collapse
No announcement yet.

How to associate guest posts to a newly created user?

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

  • How to associate guest posts to a newly created user?

    hi
    i imported Community Server
    I have some posts from a user who was deleted in the CS database.
    how his posts how as "Guest" in VB( not clickable and no post count)

    how do i associate all these Guest posts with a newly created username?

    i ran the Fix Broken Profiles, it did not catch anthing

    thanks

  • #2
    The posts will have a userid of 0 because of their user not existing when they were created.

    Though as the name is there, we're in luck.

    With the userid of the new user you can run this SQL :

    Code:
    "UPDATE post SET userid=X WHERE username LIKE 'Jerry'"
    As with all direct database actions, take a database backup before you do this.
    I wrote ImpEx.

    Blog | Me

    Comment


    • #3
      Thanks Jerry for the reply.

      I am a total newbie and a non-programmer , could you please elaborate:
      where would i "run this sql" ? within VB admin control panel? or phpMyAdmin or somwhere?

      lets say new username that i created in VB is Jack.
      and i want imported posts that show Guest as username to go under Jack
      is this how i code it?

      Code:
      "UPDATE post SET userid=[B]Jack[/B] WHERE username LIKE '[B]Guest[/B]'"

      Comment


      • #4
        You want all posts that show "Guest" as a username to go under the username and account Jack ?
        I wrote ImpEx.

        Blog | Me

        Comment


        • #5
          yes. (because i dont think any other users were allowed to post as Guest on the Community Server forum.)

          Comment


          • #6
            If you have created Jack, find their userid by searching for them in your admincp, and seeing what it says at the top of the page.

            Then run this SQL via the admincp or phpMyAdmin :

            UPDATE post SET userid=X WHERE userid=0

            And all guest posts will be associated with Jack, where Jack's userid is X.

            Take a backup of your database before you do this.
            I wrote ImpEx.

            Blog | Me

            Comment


            • #7
              thanks Jerry that worked.

              now i need to associate the Threads that do not show thread owner to a specific user.
              is there an sql string i can run for this also?

              Comment


              • #8
                Code:
                UPDATE thread SET postusername='X', postuserid='Y' WHERE postuserid=0
                I wrote ImpEx.

                Blog | Me

                Comment

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