Platinumwealth.co.za Posted May 23 Posted May 23 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?
Marc Posted May 23 Posted May 23 There isnt a way in which you would be able to ban them in that manner, however as a suggestion, what you could do is create a group with no permissions and move them all to that group, if its something where you want to immediately remove their access. Platinumwealth.co.za and Sonya* 2
Platinumwealth.co.za Posted May 23 Author Posted May 23 I understand. Perhaps it is a feature to look into, but I will attempt the workaround for now to get a grip on the situation. Thanks.
SoloInter Posted May 23 Posted May 23 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.
Platinumwealth.co.za Posted May 24 Author Posted May 24 The above approach is not effective. I need a way to ban (apply the "flag as spammer") everyone in a specific date range
Marc Posted May 24 Posted May 24 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
Platinumwealth.co.za Posted May 24 Author Posted May 24 (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 May 24 by Platinumwealth.co.za
Marc Posted May 24 Posted May 24 I have moved this to our developer connection forum where you may get better assistance on that. Generally we would not share things that are not explicitly tested for that purpose
teraßyte Posted May 24 Posted May 24 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.
BN_IT_Support Posted May 25 Posted May 25 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
Platinumwealth.co.za Posted May 27 Author Posted May 27 I appreciate the responses, my requirement has changed, I pruned the users, it kept their content as guest (>1000 of orphans) I need a way to delete ALL guest content in one shot.
Recommended Posts