Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Cleanser Plugin - List Not Limited to Users with 0 comments/discussions

This discussion is related to the Cleanser addon.
peregrineperegrine MVP
edited December 2014 in Vanilla 2.0 - 2.8

in reply to @Fraxture here:

I'm trying to use the cleanser plugin to purge users that resulted from a massive spam attack on a site I manage. From reading the readme, I think that the plugin is supposed to select users with zero comments or discussions. But that is not what is happening, the resulting lists seems to include all the users irregardless of the number of discussions/comments. Is there something that I've missed here?

version 2.9 has an updated readme.

My site has recently suffered a massive spam attack. We have something like 15K users, almost all of them not legit I think. Most of these users have 1 discussion or so... I am just looking for tools to help me chip away at getting these spam users out of the system...

readme item 7 should be ignored since the plugin has changed.

http://vanillaforums.org/discussion/28874/cleanser-plugin-list-not-limited-to-users-with-0-comments-discussions

try changing the class.cleansermodel.php

from

->Where('ur.RoleId', $therole);

to

                 ->Where('ur.RoleId', $therole)
                ->Where('u.CountComments <', "1")
                ->Where('u.CountDiscussions <', "1");

see if that helps and report back.

or try this

from

->Where('ur.RoleId', $therole);

to

   ->Where('ur.RoleId', $therole)
                 //   /* only use 0 discussions 0 comments  
                    ->BeginWhereGroup()
                    ->Where('u.CountDiscussions', 0)
                    ->OrWhere('u.CountDiscussions is null')
                    ->EndWhereGroup()
                    ->BeginWhereGroup()
                    ->Where('u.CountComments', 0)
                    ->OrWhere('u.CountComments is null')
                    ->EndWhereGroup()
                  //  end only use 0 discussions 0 comments  */

or try

you might also try

if you only want to target users with a userid greater than 15000.

try changing the class.cleansermodel.php

from

->Where('ur.RoleId', $therole);

to

       ->Where('ur.RoleId', $therole)
       ->Where('u.UserID >', "15000");

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

fraxture

Comments

  • Thanks for these tips @peregrine‌! I'll let you know if that helps.

  • Actually, is there a way to search by when the users joined or first visited -- for example all users that joined after December 24th...

  • peregrineperegrine MVP
    edited December 2014

    @fraxture said:
    Actually, is there a way to search by when the users joined or first visited -- for example all users that joined after December 24th...

    from

    ->Where('ur.RoleId', $therole);

    to

        ->Where('ur.RoleId', $therole)
        ->Where('u.DateFirstVisit >', '2014-12-24');
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    fraxture
  • Okay. Suddenly a bunch of my threads have become inaccessible. Is it possible that this plugin is corrupting the data?? Good thing I made a backup.

  • peregrineperegrine MVP
    edited December 2014

    Okay. Suddenly a bunch of my threads have become inaccessible. Is it possible that this plugin is corrupting the data??

    no. I don't believe so. you probably have a syntax error in plugin when you modified the plugin.

    Good thing I made a backup.

    glad you followed the suggestion in the plugin read me and description. a very smart thing to do.

    It deletes users completely via the standard process of deletion based on the users in your cleanserlist.

    don't panic and explain what you are doing and did.

    did you verify the cleanserlist? was the list comprised of users you wanted to delete.

    so no, it doesn't corrupt anything. but follows your instructions based on your user list.

    but if you are modifying the plugin you could have added users to the cleanserlist, you may not have intended to add.

    If you are doing 1000's and 1000's of deletions it is smart to re-optimize tables with phpmyadmin,

    I don't know what you did or what you mean. so I can't answer your question.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • It's okay, I just reloaded the database from before I began. I really don't know what happened. Suddenly a whole set of Discussion Threads were just unavailable, meaning I got an error message screen saying something had gone wrong, and that the page was not available. I'm going to try again being more careful as I go.

  • peregrineperegrine MVP
    edited December 2014

    you probably created a syntax error in the plugin with your modifications.

    you should look at the FAQ.

    http://vanillaforums.org/discussion/28420/faq/p1

    it explains what to do , if it says "Something has gone Wrong".

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited December 2014

    @fraxture‌

    you have to put the semi-colons in the correct places and remove the semi-colons from the correct places

    see code above.

    and thanks for pointing out discrepancy in readme. readme is corrected now.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine okay i see how i can debug that error message if i run into it again. thanks.

    another question: i the code above

     ->Where('ur.RoleId', $therole)
                 //   /* only use 0 discussions 0 comments  
                    ->BeginWhereGroup()
                    ->Where('u.CountDiscussions', 0)
                    ->OrWhere('u.CountDiscussions is null')
                    ->EndWhereGroup()
                    ->BeginWhereGroup()
                    ->Where('u.CountComments', 0)
                    ->OrWhere('u.CountComments is null')
                    ->EndWhereGroup()
                  //  end only use 0 discussions 0 comments  */
    

    should the last ->EndWhereGroup() have a semicolon?

  • Okay, I've run into the same problem again. After running the Cleanser on a whole set of users, I loaded up one of the discussion threads and it produced the error screen. With debug on here were the results. I can't really make any sense of them yet:

  • peregrineperegrine MVP
    edited January 2015

    do you have a plugin called SendPM, it looks like it is causing an error.

    try disabling the SendPM plugin, and see if your errors go away.

    if you look at the second line of your error backtrace, it give you hints.

    I believe your issue this has nothing to do with cleanser plugin whatsoever, but just a coincidence.

    try disabling it.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @fraxture

    a good idea to scan this list

    http://vanillaforums.org/discussion/26703/plugins-themes-that-work-and-dont-work-in-vanilla-2-1

    and hope that other users of the community are adding to it, istead of sitting back idly, waiting for others to do it,

    a close reading of this will actually help you as well should you take the time, it gives hints, although not exactly for solving your issue, but other issues you may run into.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited January 2015

    @fraxture said:
    Okay, I've run into the same problem again. After running the Cleanser on a whole set of users, I loaded up one of the discussion threads and it produced the error screen. With debug on here were the results. I can't really make any sense of them yet:

    nothing to do with cleanser plugin.

    As, I mentioned it is not cleanser, but you have not responded, so I don't know if you saw this under the sendpm plugin.

    this is answered under the sendpm plugin, which doesn't like it when you have debug enabled.

    vanillaforums.org/discussion/28616/generating-error-when-accessing-discutions

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine: point taken. i think rather somehow clenaing with the cleanser is triggering that error with the PM plugin. I disabled it and the problem seemed to be okay... Perhaps it is triggered because the cleanser removes a user and somehow the PM plugin is looking for that user, and then when it can't find it trigger an error.... who knows.

  • peregrineperegrine MVP
    edited January 2015

    @fraxture said:
    peregrine: point taken. i think rather somehow clenaing with the cleanser is triggering that error with the PM plugin. I disabled it and the problem seemed to be okay... Perhaps it is triggered because the cleanser removes a user and somehow the PM plugin is looking for that user, and then when it can't find it trigger an error.... who knows.

    no, it is triggered because you have debug on in your configuration. and the PM plugin does not work with debug on.

    you are scaring people off the cleanser plugin, because you have issues with other plugins, which has absolutely NOTHING to do with cleanser. As much as I appreciate trying to help you, and I'm glad the cleanser may have helped you delete spammers from your forum. But your assumptions are off. It is not cleanser plugin, causing you issues. Take the time to read the link I posted.

    read closely :if you try the changes I suggested in this link - you may not have any problems.

    http://vanillaforums.org/discussion/28616/generating-error-when-accessing-discutions

    you might also run this if your counts are off: which is also unrelated but a good thing to do.

    http://vanillaforums.org/discussion/comment/219686/#Comment_219686

    what you might want to say is this. The cleanser plugin helped me remove spammers. and then post your other issues in the discussion related to the appropriate plugin SendPM

    http://vanillaforums.org/addon/1206/send-pm

    now you are frustrating me :wink:

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • AnonymooseAnonymoose ✭✭
    edited January 2015

    Moose perfer natural organic cleansers.

  • @Anonymoose said:
    Moose perfer natural organic cleansers.

    now you are frustrating me as well :wink:

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.