Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Spam Registrations: delete from SP or database?
Avatar
MartiL
Member
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 4:13 pm

Yes, the plugin selects ALL users who have not posted /commented EVER, regardless of their registration date and the offset given.

See the screenshots in this post, I don't want to delete members who have just registered and haven't had time to post. So I thought I'd give them 60 days so the plugin would select only members who were registered at least 60 days ago.

The plugin selected every 'zero poster', including members who only just registered.

If that offset doesn't mean "registered since X days or more" but "have not posted for X days or more" you could be removing members who usually are active, but (in my case) are mid-ocean and can't post for a couple of weeks ...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 4:26 pm

no, the date compare is only done on the registration date...  and have never posted...  if they have ever posted, they wont be eligible for spam removal...

so for a user or two that you think were registered less than the time period specified, did you do as requested and check their actual registration date in the wp users table?  the user_registered column...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2012 - 4:34 pm

Hang on Marti

Give me a few minutes - I think I may have found a flaw in the logic...

If so - can I assume you would be willing to edit and test for us?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2012 - 4:50 pm

Well this needs trying anyway...

In the file /ahah/sp-spam-reg-ahah.php

starting at line 73 s this block of code:

if ($badusers) {
    $candelete = false;
    $found = false;

    foreach ($badusers as $baduser) {

I think we need to re-arrange that so that is becomes:

if ($badusers) {
    foreach ($badusers as $baduser) {
        $candelete = false;
        $found = false;

Think that might be the root of the issue you are seeing...

andy-signature.png
YELLOW
SWORDFISH
Avatar
MartiL
Member
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 4:50 pm

Yes, see screenshot (I pasted the dates over the email addresses):

database.jpgImage Enlarger

When I run the plugin, it selects all those users (exept the ones who posted), regardless of the offset used (60 days in this case).

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 4:52 pm

did you try andy's change?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 23, 2012 - 4:52 pm

We posted at the same time, Please see my posts 23 and 24 above...

andy-signature.png
YELLOW
SWORDFISH
Avatar
MartiL
Member
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 5:13 pm

All posting at the same time - how's that for amazing support? 🙂

I'll try the solution Andy posted in # 24 and report back to you in a bit. Thx!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 5:14 pm

okay, we shall be waiting...

Avatar
MartiL
Member
Free Members
sp_UserOfflineSmall Offline
Mar 23, 2012 - 5:31 pm

Yay, it works!

The highest user-ID is now 261, which belongs to a member who registered on Jan. 20th laugh

* Thank you! * I'm so happy it works 🙂

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625