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

Mass Delete Spam Users 1.0.0

No permission to download
Multi Select and Delete Spam User Accounts

Sadik B

Well-known member
#1
sadikb submitted a new resource:

Mass Delete Spam Users (version 1.0.0) - Multi Select and Delete Spam User Accounts

This is something I quickly put together when I was working for a client who had hundreds of spam registrations.

Install as usual and go to

ACP-->Users-->Mass Delete Spam Users

That will show all user accounts where a user has less than or equal to X (configurable via ACP options) number of posts but has urls in homepage or signature or about fields.

You can also set an option of how many users you want per page on that page so that you can delete quicker if you have hundreds of spam...
Read more about this resource...
 
#2
Works well however i would have liked to see that it could mass delete profile comment spam too. Thats a bigger problem at the moment
 

Puntocom

Well-known member
#10
Message count limit set to 0 and it shows no results in /admin.php?users/mdslist

What should I do? I have tons of spammy users with no content :S
 
#15
Amazing how well this simple mod works. I just deleted about 4300 users (yes really) with this plugin within minutes.

Another nice thing is that unlike the "Spam cleaner" function, this actually wipes out all traces of the user instead of just deleting posts and leaving their user info (including homepage and such) behind.

Thanks for making/sharing it.


PS: It would be great to have the ability to delete by IP. There are some spam users left in the DB that have 60+ spam accounts from the same IP.
 
#16
another option I could use, I have 8300 members but only 240 users have > 0 posts. I'd like to mass delete all users who have zero posts, but feel bad for honest lurkers. So would like to add a registration date rule, that is: delete all users with 0 posts who registered more than 12 months ago
 
#17
Thanks for the tool btw. It allowed me to easily delete 178 users. But I still have over 8000 which I suspect registered before I had better registration safeguards in place.
 

Coop1979

Well-known member
#19
I was just playing around with this and found it fairly easy to add a data component. You just have to modify ModelUser.php in the MassDeleteSpammers folder within /Library.

PHP:
<?php
class MassDeleteSpammers_ModelUser extends XFCP_MassDeleteSpammers_ModelUser
{
    public function findAccounts($start, $stop)
    {
        $options = XenForo_Application::get('options');
        $start = ($start - 1) * $stop;
 
        $spam = $this->_getDb()->fetchAll("
            SELECT    xf_user.user_id,
                    xf_user.username,
                    xf_user.message_count,
                    xf_user.is_banned,
                    xf_user.last_activity,
                    xf_user_profile.homepage,
                    xf_user_profile.signature,
                    xf_user_profile.about
            FROM    xf_user, xf_user_profile
            WHERE    xf_user_profile.user_id = xf_user.user_id
            AND    xf_user.message_count <= ?
            AND        xf_user.last_activity <= '1272647212'
            AND
            ((homepage LIKE '%URL%' OR signature LIKE '%URL%' OR about LIKE '%URL%') OR
            (homepage LIKE '%HTTP%' OR signature LIKE '%HTTP%' OR about LIKE '%HTTP%'))
            ORDER BY xf_user.user_id DESC
            LIMIT ?, ?
        ", array($options->MDS_limit, $start, $stop));
 
        return $spam;
    }
 
    public function getAccountsCount()
    {
        $options = XenForo_Application::get('options');
 
        $count = $this->_getDb()->fetchOne("
            SELECT    COUNT(*) AS total
            FROM    xf_user, xf_user_profile
            WHERE    xf_user_profile.user_id = xf_user.user_id
            AND        xf_user.message_count <= ?
            AND        xf_user.last_activity <= '1272647212'
            AND
            ((homepage LIKE '%URL%' OR signature LIKE '%URL%' OR about LIKE '%URL%') OR
            (homepage LIKE '%HTTP%' OR signature LIKE '%HTTP%' OR about LIKE '%HTTP%'))
        ", $options->MDS_limit);
 
        return $count;
    }
}
?>
Add the new lines, then change the UNIX time to be a timestamp that you want to limit it to. You can convert a traditional time format to the UNIX format on this site:

http://www.epochconverter.com/