Announcement

Collapse
No announcement yet.

Delete all posts by user doesn't work

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

  • Steve Machol
    replied
    You would need a query to do this. This is not fully tested so use it at your own risk:

    DELETE FROM `post` WHERE username='deleteduser';

    If you are going to try this, backup your database first. Also update the thread and forum counters after running this query.

    Leave a comment:


  • SSonnentag
    replied
    OK, that works. If I (or anyone else who does this and reads this thread) repeat this mistake I'll know how to recover from it so that I don't have to manually delete each and every post one at a time.

    Thanks.
    Shawn

    Leave a comment:


  • SSonnentag
    replied
    As you said, my test case failed and I'm sure that is what happened earlier today. So, is there an easy way to delete posts when the user has been deleted? The individual posts still have the username attached to them.

    I wonder if I could create a new user using the same username and then delete the messages and then the username again.

    Shawn

    Leave a comment:


  • Steve Machol
    replied
    Yes, if you had deleted the user first then this would not have worked.

    Leave a comment:


  • SSonnentag
    replied
    I went into the Admin control area and clicked on "Mass Prune" under Threads & Posts. Under Prune by username I entered the desired username I wanted to have all posts deleted for. I left Forum: ------ all ------ and selected Yes to include sub forums. When I hit the Prune button I was presented with the line:

    You are about to delete all posts and threads from all forums by one of these users. Please select one:

    But there were no options, buttons or anything else underneath to select.

    A few minutes ago I created a new test user, posted a few test messages and was able to successfully delete the posts in the manner I list above. I don't understand why I was unable to do this with the "real" username.

    I MIGHT have deleted the user account prior to attempting to delete the messages, but I can't remember for sure. I'll try another test where I'll post a few messages, delete the user and then try to delete the messages. I have a feeling that this won't work.

    Shawn

    Leave a comment:


  • Steve Machol
    replied
    How were you trying to delete these posts?

    Leave a comment:


  • SSonnentag
    started a topic Delete all posts by user doesn't work

    Delete all posts by user doesn't work

    vBulletin v2.2.9
    PHP v 4.2.3
    MySQL v3.23.39
    Apache v1.3.27
    Linux Red Hat v?

    My site was recently hit by a spammer peddling his porn wares. I tried to remove all posts by the particular username, but all I got back was a line stating something like "Select by thread or by post." I don't recall the exact statement, but none of the posts were deleted. What did I do wrong?

    Shawn

Related Topics

Collapse

Working...
X