Wednesday, May 9, 2018

How I helped myself screen spam registrations at my PHPBB forum

I get a lot of spam registrations at my PHPBB forum. So I asked new users to tell a little about themselves like this:

In Administration Control Panel, Users and Groups, Custom profile fields, I added an "about" field asking new registrants to tell about themselves. It looks like this on the registration page.

In this file
I added a line for ABOUT here:
  'ABOUT'  => request_var('pf_about', ''),
  'USERNAME'   => htmlspecialchars_decode($data['username']),
  'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
  'U_ACTIVATE'  => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")

In this file
I added a message to myself using the ABOUT template variable like this:
Subject: Activate user account

is what {USERNAME} just said about themself upon registering at the CNM Forum
That's all. Now those spam registrations take me only a second to triage and delete. Robots aren't that smart yet!

No comments: