If your web site is anything like mine, you have spammers registering as users in the hope that they will have their spammy comments show up.

Here is how you can get b2evolution 1.8 to automatically delete the users if they have not validated their email address within 7 days.

First, copy this file to …/blogs/inc/CONTROL/cron/

Then edit …/blogs/inc/CONTROL/cron/crontab.php and add in these records:

$cron_job_names:

‘delete_users’ => T_(‘Delete invalid users’),

$cron_job_params:

‘delete_users’ => array(
‘ctrl’ => ‘cron/_delete_users.job.php’,
‘params’ => NULL ),

Then go to the Scheduler page in the backoffice, and add a new job.

Now all your fake spam users will get autodeleted!

« »