Had to quickly delete a user,

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Elyk
    Senior Member
    • Sep 2003
    • 292
    • 4.2.x

    Had to quickly delete a user,

    and had no time to search for answer. Have deleted user now and yes should've deleted their posts and threads first. Now their posts are labelled with their name and usertitle is now guest. I need to still be able to delete all traces as most of the posts were quite damaging to other members. Is there a query that I can run to remove all of the "guest" posts?
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    The username is still recorded in the posts. This query should delete those posts:

    DELETE FROM post WHERE username = 'username'

    And this one should take care of their threads:

    DELETE FROM thread WHERE postusername = 'username'

    If you use table prefixes then you need to change the table names, post and thread, to include the prefix. Backup first!

    After you run these queries you will need to rebuild your various counters, including your search index:

    Admin CP -> Import & Maintenance -> Update Counters

    Comment

    • Elyk
      Senior Member
      • Sep 2003
      • 292
      • 4.2.x

      #3
      Thanks again Jake.

      For the very quick response as usual, will try what you suggested.

      Comment

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