From 9d752514be27e88187658aba793387e2dc0884b9 Mon Sep 17 00:00:00 2001 From: Brian Lycett Date: Wed, 27 May 2020 17:34:40 +0100 Subject: [PATCH] Fix email validity check --- www/includes/web_functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/includes/web_functions.inc.php b/www/includes/web_functions.inc.php index 181ab86..4ebc2bb 100644 --- a/www/includes/web_functions.inc.php +++ b/www/includes/web_functions.inc.php @@ -326,7 +326,7 @@ function set_page_access($level) { 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; }