Quote:
Originally Posted by Snowhog
You could write two additional plugins (give each a unique plugin name) using the code with only a slight modification.
|
That's a good thought, but unfortunately it won't work the way this is written. It replaces the code that verifies an email address, so if you have multiple plugins doing the same thing, only the last one to run would have any effect.
You might be able to do something like this:
Code:
$this->validfields['email'][VF_CODE] = '
$max_chars = array("." => 1, ":" => 0, ";" => 0);
if ($retval = $dm->verify_useremail($data))
{
$parts = explode("@", $data);
if (is_array($parts))
{
foreach($max_chars AS $char => $max)
{
if (substr_count($parts[0], $char) > $max)
{
$dm->error("bademail");
$retval = false;
break;
}
}
}
}
return $retval;
';
(But I haven't tested it at all).