Fix email validity check

This commit is contained in:
Brian Lycett 2020-05-27 17:34:40 +01:00
parent eb061e3586
commit 9d752514be

View File

@ -326,7 +326,7 @@ function set_page_access($level) {
function is_valid_email($email) { function is_valid_email($email) {
return (!preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $email)) ? FALSE : TRUE; return (!filter_var($email, FILTER_VALIDATE_EMAIL)) ? FALSE : TRUE;
} }