1
1
Fork 0

fix validate_email

This commit is contained in:
Johannes Schwab 2015-02-23 12:20:05 +01:00
parent 66e075ff95
commit 1cd1f7587c

View file

@ -651,7 +651,7 @@ function validate_email($addr) {
return false; return false;
$h = substr($addr,strpos($addr,'@') + 1); $h = substr($addr,strpos($addr,'@') + 1);
if(($h) && (dns_get_record($h, DNS_A + DNS_CNAME + DNS_PTR + DNS_MX) || filter_var($h['host'], FILTER_VALIDATE_IP) )) { if(($h) && (dns_get_record($h, DNS_A + DNS_CNAME + DNS_PTR + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) {
return true; return true;
} }
return false; return false;