1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I prune profile posts

Discussion in 'XenForo Questions and Support' started by cmeinck, Aug 2, 2012.

  1. cmeinck

    cmeinck Well-Known Member

    I'm working hard to remove any sort of spam from my forums. I've restricted view user access to registered only. Still, I'd like to clean up some assorted profiles that I've found left from vBulletin.

    Is there a way to delete profile posts from users with 'x' number of posts?
  2. borbole

    borbole Well-Known Member

    Run this query:

    UPDATE `xf_profile_post`
    LEFT JOIN `xf_user`
    (xf_user.user_id = xf_profile_post.user_id)
    SET xf_profile_post.message = '' WHERE xf_user.message_count < x;
    Replace x with the number of posts and if you are using a different prefix for your db tables other than xf_, replace it at the query above.
    Jake Bunce likes this.
  3. cmeinck

    cmeinck Well-Known Member

    Thanks so much. Your queries have been a huge help. (y)
    borbole likes this.
  4. borbole

    borbole Well-Known Member

    Glad to have been of help :)

Share This Page