Use filter_var($x, FILTER_VALIDATE_EMAIL) as an extra check if we can in check_email(...)

pull/154/head
David Goodwin 7 years ago
parent 5e1855632a
commit e2b1233269

@ -277,6 +277,12 @@ function check_email($email) {
return Config::lang_f('pInvalidMailRegex', $email);
}
if(function_exists('filter_var')) {
$check = filter_var($email, FILTER_VALIDATE_EMAIL);
if(!$check) {
return Config::lang_f('pInvalidMailRegex', $email);
}
}
// Determine domain name
$matches=array();
if (!preg_match('|@(.+)$|', $ce_email, $matches)) {

Loading…
Cancel
Save