|
Automatically deny registration for users with multi-dotted email address
On my forum many bots have multi-dotted email address so I wanted to avoid them to create a new account on my forum.
The way to do this is create a new plugin to recognize these multi-dotted email address provided at time of registration and delete them automatically. Steps:
Code:
$this->validfields['email'][VF_CODE] = '
$max_dots = 1;
if ($retval = $dm->verify_useremail($data))
{
$parts = explode("@", $data);
if (is_array($parts) && substr_count($parts[0], ".") > $max_dots)
{
$dm->error("bademail");
$retval = false;
}
}
return $retval;
';
Special thanks to kh99 who provided this solution. Download No files for download. |
|||||||||