Jump to content

Mass ban all accounts going back X years?


Recommended Posts

Hello everyone, hoping someone can assist with an issue we have. 

 

We started a forum many years ago, then during covid hit some hard times and did not had the means to keep moderators, now we have managed to come back and wish to restore the forum to it's reputable state.

However since then a flurry of spammers infiltrated the forum (>1000). 

Right now we are banning each user by hand via the front end moderator tool / interface / GUI.

However, I am hoping there is maybe a way to do this via the backend, perhaps a script or SQL query I can run that will essentially apply the ban functionality to all users between a specific date?

Any other suggestions?

Link to comment
Share on other sites

Where do they come from geographically speaking? Abroad?

We use Cloudflare as a CDN and Firewall. Few country are banned (Russia, Korea, Ukraine, ...).

Most of the robots, spammers, etc ... come from country you don't need. So block all the country and salam.

Link to comment
Share on other sites

6 minutes ago, Platinumwealth.co.za said:

The above approach is not effective. 

I need a way to ban (apply the "flag as spammer") everyone in a specific date range

There isnt a way in which to do this on the platform at the present time, unforunately

Link to comment
Share on other sites

Posted (edited)

Can you share the SQL queries that are run when you press "Flag as Spammer" then I will create that function. 

The issue is >1000 spammers registered between January 2024 and March 2024 each only posting 1 to 10 replies. 

Manually flagging each one as spam will take months. 

Edited by Platinumwealth.co.za
Link to comment
Share on other sites

A query won't cut it. The flag as spammer function performs several actions based on the chosen settings.

 

You need a custom script that loads all the members and flags them 1-by-1. It's doable since I've done something similar for a client previously.

Link to comment
Share on other sites

On 5/24/2024 at 9:04 AM, Platinumwealth.co.za said:

The above approach is not effective. 

I need a way to ban (apply the "flag as spammer") everyone in a specific date range

Hi,

I agree with teraByte - write a custom application to do this - you possibly only need one significant script file. I would guess it is less than 20 lines of script:

  • define 'where clause' ($where) that compares the join date against your date range
  • create iterator of selected Members: new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_members', $where), 'IPS\Member' );
  • Loop through members calling ->flagAsSpammer()
  • At end of loop you're all done.

John

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...