Support Forum

Spam Registrations: delete from SP or database?

MA MartiL
MartiL
Member

Hi guys,

Quick question: I’d like to use the Spam Registrations plugin, but would like to know if it removes the users from SP only or will it delete their WP account?

I would like to clean out all the lurkers, but I don’t want their WordPress account removed as we use the account for more then just the forum.

Thanks!

42 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Complete and total removal I am afraid.

But – it is a VERY simple code change if you wanted to change it for your own purposes.

In the file /admin/sp-spam-reg-admin-list-save.php there are 4 sql DELETE statements. All you would need to do is remove or comment out the top two (users and usermeta tables).

MA MartiL
MartiL
Member

That’s *very* easy indeed, thx!

When accounts are removed that way -only from SP but not the WP database-, are those users then ‘blocked’ from the forum or can they simply logon again? (Because then, I just realised, it would be kind of useless ;)).

If so, is it possible to edit the code so spammers/lurkers are moved to certain usergroup?

YS Yellow Swordfish
Yellow Swordfish
Member

they can log in (because that is a WordPress function) but they belong to no SP User Groups so will be treated as a Guest and subject to whatever permissions you have assigned to Guest status.

They will also appear in the Manage User Groups admin panel as users with no memberships.

MA MartiL
MartiL
Member

Ah, that’s perfect! 🙂

Thanks (again!), I’m off to install and edit the plugin and start cleaning house laugh

YS Yellow Swordfish
Yellow Swordfish
Member

Good luck! Always recommend making a quick backup of the DB first of course!

MA MartiL
MartiL
Member

Erhm, yes, I’ve learned the backup-lesson … 😉

Sorry to keep you at your computer (the sun is finally shining!) but I just ran the plugin, wanting to remove all members who have been lurking for (at least) 60 days. I noticed the plugin selects all lurkers/spammers though, not just the 60+ day members.

Am I not getting the purpose of that setting or what could cause this?

60-days.pngcaptain-rob-1.png

There’s more than just that one guy, I just noticed him because I remember him registering for the site.

(and yes, the User-ID was a tip-off as well laugh)

YS Yellow Swordfish
Yellow Swordfish
Member

Oh dear – do we have a bug? Let mew go and look at the code.

YS Yellow Swordfish
Yellow Swordfish
Member

Does that image show some sort of membership plugin registration? If so can you check for ‘Captain Rob’ in the WordPress users to see of he was registered prior to that on the site? Or is that not a possibility?

MA MartiL
MartiL
Member

Yes, I use s2Member, but there were no registrations on this site before s2 was installed. The image you see is the regular WP user search, not s2’s – even if you access the users through the s2 menu you’re redirected to WP itself.

Edit: just in case it’s relevant: this user has a free membership, so nothing much happening with s2 member since there’s no payment processing or anything else going on.

I’ve had a look around; the plugin has selected all 0-post users, regardless of their registration date. Same thing when I use another offset.

I’m not knowledgeable enough to make sure it doesn’t have anything to do with s2, but since all data is stored in wp_users I don’t think it should be a problem?

MP Mr Papa
Mr Papa
Member

sorry, just waking up…  so you are saying the 60 days or older was being ignored?

MA MartiL
MartiL
Member

I’ve been out of bed since 7 but still trying to wake up laugh

But yes, that’s what’s happening. The plugin ignores the offset (no matter what the number) and selects all ‘zero post’ users. Granted, that’s a good cleaning job, but I thought I’d give people a couple of weeks to muster up the courage to post wink

MP Mr Papa
Mr Papa
Member

okay, will have to open a ticket to investigate…

MP Mr Papa
Mr Papa
Member

hmmm… not able to duplicate… its paying attention to the specified days for me… have asked Andy to take a look and see what it does for him…

MA MartiL
MartiL
Member

Would you like me to PM you guys a login for my site?