Home » PhpBB3 Mods » phpBB Ban Future Email Types mod
formats

phpBB Ban Future Email Types mod

Published on May 14th, 2010 by in PhpBB3 Mods

This phpBB3 mod will ban the use of email address accounts for any future registrations.


Note : This does not affect current registrations which is the case when using the inbuilt PhpBB3 “ban emails” admin control panel setting.

This is an extremely effective way to reduce spam on your forums.

Open :

/includes/functions_user.php

Find :

$allowed_email = ($allowed_email === false) ? strtolower($user->data['user_email']) : strtolower($allowed_email);

After add :

$bademail = array("hotmail","gmail.com","@live.","yahoo"); // Put banned email types here

reset($bademail);

foreach($bademail as $findbademail)
{
if (stripos($email,$findbademail) !== false)
{
return 'We do not allow free email accounts like "' . $findbademail . '" to be used on these forums.';
}
}

unset($bademail,$findbademail);

Demo site:

phpBB Ban Future Email Types mod demo is available here

Try to join the forum with either a yahoo or hotmail email

 
Tags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© ServA1
credit