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

XF 1.1 Delete users with zero posts....

Discussion in 'XenForo Questions and Support' started by vVv, Oct 23, 2012.

  1. vVv

    vVv Guest

    I checked some threads out, didn't really see anything definitive though. I'm sure there's database query to run perhaps.. I need something to run that deletes maybe newest users, zero posts, in specific "registered" member group only. Because I have "paid access" usergroup, that has paid users in there, with some zero post counts. And other usergroups as well. I'm mainly focusing on just normal "registered users", with zero posts.

    Delete xf_user = 0 posts from usergroup id = "x";

    Code:
    DELETE
    FROM user_group_id = X;
    SELECT xf_user
    WHERE message_count = 0;
     
    Brandon Sheley likes this.
  2. vVv

    vVv Guest

    got it, thx for help... :rolleyes::LOL::p
    Code:
    DELETE
    FROM `xf_user`
    WHERE `user_group_id` =2
    AND `message_count` =0
    nah, i knew it was something simple though lol. xD
     
    Brandon Sheley likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Note that deleting users this way is not a complete deletion. It will leave behind orphaned records in various joined tables. There is no simple query to cleanly delete a user because it involves many different tables. The orphaned stuff isn't necessarily a problem though.
     
    1 person likes this.
  4. vVv

    vVv Guest

    Thanks Jake... :) Yeah, I was thinking that exact same thing actually.. I figured there was probably other records some where. Just wasn't sure how to do that, I just wanted them gone. haha.
     
    Brandon Sheley likes this.
  5. xfrocks

    xfrocks Well-Known Member

  6. vVv

    vVv Guest

    i think that's the one i installed.. by floris.. beta 2. but i think that only gave for 2 options, and i was afraid it might delete "valid users" by mistake. I didn't see where it gave option to remove users from only the "registered users" group. I have guys on there that aren't always active, that are in other usergroups... like "Paid access" .. "model access" .. and etc. If those people didn't post in a month, because of being busy with normal / real life.. then wanted to come back.. I'd have p-ed off paid members and model members.. lol.
     
  7. vVv

    vVv Guest

    i would really love that plugin to have a drop menu though, to select specific usergroup(s). that would be awesome.. xD
     
  8. xfrocks

    xfrocks Well-Known Member

    Well, that add-on is actually mine. I may add the user group option sometime.
     
    Andy.N and (deleted member) like this.
  9. vVv

    vVv Guest

    Oh, okay.. :) And that would be awesome if you did that... :) :D i'll keep an eye out for it ;) i'll leave it installed, and if by chance an update with it comes along, i'll just upgrade it :)
     
  10. Andy.N

    Andy.N Well-Known Member

    I installed it a long time ago and quickly uninstalled it because it was easy to mistakenly delete valid members.
    There is no usergroup filter so I couldn't delete on members from a specific usergroup. And there is no preview of the users deletion so I don't have a chance to double check before clicking on that delete button.

    Would be great if this will be updated. I believe many people would find a use for this addon.
    I need to delete thousands of members on a private forum and still haven't found a way to do so.
     
    1 person likes this.
  11. Brandon Sheley

    Brandon Sheley Well-Known Member

    It would be great if that prune zero post users worked, I couldn't get it to work before. :(
     
  12. vVv

    vVv Guest

    Trying to weed out "guest" posts and threads lol. I believe this is correct..of course I don't think all "records" are deleted..

    Code:
    DELETE
    FROM `xf_thread`
    WHERE `user_id` =0
     
    DELETE
    FROM `xf_thread`
    WHERE `user_id` =0
    AND `username` LIKE 'guest'
     
    DELETE
    FROM `xf_post`
    WHERE `user_id` =0
     
    DELETE
    FROM `xf_post`
    WHERE `user_id` =0
    AND `username` LIKE 'guest'
     
    
     
    Brandon Sheley likes this.
  13. cmeinck

    cmeinck Well-Known Member

    I hope mass pruning comes with the next version. My issue is that I've got a ton of old profiles with spammy usernames. Google is starting to ask forums to clean up their spam and I'm of the opinion that these spammy usernames help flag your site. I've tried to remove them manually, but it's a massive job and it's not foolproof. I'd like to slowly start to prune users with zero posts before a certain time period -- notably when I switched to XF.
     
    1 person likes this.
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  15. dutchbb

    dutchbb Well-Known Member

    Where did you read this? I doubt Google cares or will do anything to a forum just because they have to deal with spammers. I don't see the rationale. Furthermore I never understood the practice of deleting users just because they decided not to post for an unknown reason. Very strange imo. As a user, I would not appreciate my account getting deleted for that reason. At the least I would expect to be notified and given a chance to post.
     
  16. cmeinck

    cmeinck Well-Known Member

    You can read about it here:
    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2721437

    and here:
    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=81749

    Google also sent me a manual spam action in Webmasters. I've also heard from others who received the message. Those with a large forum, especially one that was migrated from vB, have a good chance of having spammy accounts. Sure we can remove links from users with less the X posts, but I don't think that's enough. When searching the top spam words in 'Users', I found all sorts of crap. Viagra, Casinos, Pharma. Who wants to take a chance that simply having a stable of users with those terms can flag your site.

    I care about my members and my forum. If I cut loose a few with zero posts, I'm willing to take the chance for the greater good of my forum. The day will come when Google takes action and not just warnings on this stuff. As forum owners, we can no longer accept that some spammers will get through the blockade. You have to be vigilant or be prepared for the worst.
     
  17. Digital Doctor

    Digital Doctor Well-Known Member

    I want to delete all users with Zero posts.

    Does this still work ?

    Is there a better way to do this now ?
     
  18. Digital Doctor

    Digital Doctor Well-Known Member

    Found it.
    Thanks.
    "Batch update users" = Awesome 1.2 update
     
    Nicky and Adam Howard like this.

Share This Page