(yabbse) Ban a whole domain from registering.

Started by Fizzy, June 19, 2004, 04:44:08 AM

Previous topic - Next topic

Fizzy

I'm pulling my hair out with this one on YaBBSE

I need to prevent regsitartion and more importantly the registration email from being sent to AOL email aco******s.

In the banned user facility I have tried
*@aol.com
%aol%
%@aol.com


Nothing stops the regsitration process.

In register.php I found


$request = mysql_query ("SELECT value FROM {$db_prefix}banned
WHERE (type='email' && value='$member[email]')") or database_error(__FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
fatal_error("$txt[678]$txt[430]!");

which I am guess deals with the check of the details in the banned table. I don't know how to make the query look for a part of a domain instead of a whole email address.
Does anyone have any simple solutions to my problem ?

Thanks in advance.
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Grudge

In Register2() in register.php just add something like this:

if (strpos($_POST['email'], 'aol.com') !== false)
fatal_error('You are from aol so you're not welcome here');

Note: $_POST['email'] may be something else but you should be able to work out what it is (i.e it may be $_POST['emailAddress']) - long time since I used Yabbse :)
I'm only a half geek really...

Fizzy

Hi Grudge,

Thanks for that, I'll give it a try.
At the moment I have a scrappy addition to register.php


// anti aol device
if (substr_count($member[email], "@aol") >= 1)           
    fatal_error("$txt[678]$txt[430]!");


I'll give your suggestion a try :)

I can't wait for SMF release as this problem has been resolved perfectly in the admin panel :)
"Reality is merely an illusion, albeit a very persistent one." - A.E.


Advertisement: