Quote:
Originally Posted by Snowhog
Has anyone developed a MOD to recognize these multi-dotted email address provided at time of registration so that they can be deleted automatically?
|
You could do something like this: create a new plugin using hook userdata_start and this code:
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;
';
It only checks the part before the '@', so set $max_dots to the number of dots you will allow (I think one dot in an email name probably isn't unusual, but that's up to you). Also, this uses the default 'bademail' phrase, but if you'd rather have a special error messages for "too many dots" you can create a phrase and use the varname in place of 'bademail'.
Quote:
Originally Posted by Andreas
...But this was loely developed for internal use and will not be releases, sorry.
|
Oh well...thanks for letting us know.