delete posts after deleting member?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cdr740
    Member
    • Nov 2005
    • 52
    • 4.1.x

    [Forum] delete posts after deleting member?

    Hello,

    Hopefully someone will be able to help.

    A member requested their account to be deleted along with all their posts. One of my admins deleted the account but never deleted the posts at the same time and without a profile I am now stuck.

    Is there a way to delete all the members posts? I have the user id if that's any help.

    Thank you for your help.
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    Without a members account to associate these with, you will have to do this one by one.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • cdr740
      Member
      • Nov 2005
      • 52
      • 4.1.x

      #3
      Thanks for your reply Steve.

      That's what I was dreading. I was hoping that a query with the user id could be run but if manually is the only way then I have some work to do.

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Actually here is a workaround. Register a new account that that user's old name. Then run this query:

        UPDATE post SET userid='xxx' WHERE username='Old Name';

        ...with 'xxx' being the userid number of his new account and 'Old Name' being the username on his old account.

        After that, you can delete that user's posts before deleting the account again.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • cdr740
          Member
          • Nov 2005
          • 52
          • 4.1.x

          #5
          Thank you for your help with this Steve, it's very much appreciated.

          Does this need to be done through VB admin panel>>Maintenance>>Execute SQL Query?

          I'm guessing that this works because the old username is still in the database as a guest which will then be linked with the new user id to form a account with the deleted members posts?

          Obviously I will backup the database first incase I break something. After the SQL query is ran then I guess it's just a case of updating the counters once the posts and account have been deleted.

          Comment

          • Trevor Hannant
            vBulletin Support
            • Aug 2002
            • 24325
            • 5.7.X

            #6
            You can do it either through there or phpMyAdmin.

            Yes, that's how it works. The posts still display the username but they don't' have a linked user account and yes, I'd update the relevant counters afterwards.
            Vote for:

            - Admin Settable Paid Subscription Reminder Timeframe (vB6)
            - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

            Comment

            • cdr740
              Member
              • Nov 2005
              • 52
              • 4.1.x

              #7
              Hello Steve and Trevor,

              Thank you for your help with this. I have run into a problem.

              An error occurred while attempting to execute your query. The following information was returned.
              error number: 1146
              error desc: Table 'cdr740_forum.post' doesn't exist
              My post table is named vb_post but it seems to want to use my database username of cdr740 when I run the SQL query. I get this error through the VB admin panel Execute SQL Query page. I haven't tried it through phpmyadmin.

              Any idea what I need to change please?

              Thank you for your help.

              Comment

              • Steve Machol
                Former Customer Support Manager
                • Jul 2000
                • 154488

                #8
                Check your config.php file and make sure the table prefix is set to: vb_
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment

                • cdr740
                  Member
                  • Nov 2005
                  • 52
                  • 4.1.x

                  #9
                  I have just checked the config file and it is set to prefix vb_ so am unsure what could be wrong.

                  Thanks for your help.

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    Change that query to:

                    UPDATE vb_post SET userid='xxx' WHERE username='Old Name';
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

                    • cdr740
                      Member
                      • Nov 2005
                      • 52
                      • 4.1.x

                      #11
                      That worked a treat and I managed to remove the posts. Thank you for your help, it's appreciated.

                      Comment

                      • Steve Machol
                        Former Customer Support Manager
                        • Jul 2000
                        • 154488

                        #12
                        Glad to help.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment

                        • Jheroen
                          Member
                          • Jun 2004
                          • 44

                          #13
                          Old topic, but active for me now, i did the sql trick as described above, in the DB i see that the old username is attached to the new userid and that it shows messages in the DB but in the vb admin it still says 0 messages, do i have to run some command in VB to get the messages attached in vb admin also?

                          Comment

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