Support Forum

Spam Registrations: delete from SP or database?

42 Answers

New Answer

MP Mr Papa
Mr Papa
Member

I dont know if that would help…  Andy also reported he could not duplicate issue with the # of days parameter…

MA MartiL
MartiL
Member

frown And I can’t duplicate your succes laugh

I’ll deactivate s2member and run the plugin again just to be sure …

MP Mr Papa
Mr Papa
Member

okay, though I doubt it matters…  as long as the user_registered column in the db (users table) is correct with that plugin…  the plugin does a date compare against that field…

MA MartiL
MartiL
Member

My thoughts exactly, and I checked the database (in phpMyAdmin) and user_registered in in the correct place (wp_users). So as expected, deactiviating s2 didn’t do anything …

So no surprise there, but running the plugin still results in all zero posters being selected … eek

I’m baffled …

MP Mr Papa
Mr Papa
Member

wait… confused…  I thought it was selecting too many users?

so if you say 60 days, it will search for users that have not posted (blog or forum), have not commented and who registered more than 60 days aqo…  is that how you read that?

MA MartiL
MartiL
Member

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 …

MP Mr Papa
Mr Papa
Member

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…

YS Yellow Swordfish
Yellow Swordfish
Member

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?

YS Yellow Swordfish
Yellow Swordfish
Member

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…

MA MartiL
MartiL
Member

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

database.jpg

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).

YS Yellow Swordfish
Yellow Swordfish
Member

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

MA MartiL
MartiL
Member

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!

MA MartiL
MartiL
Member

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 🙂