From 270046795d391a18ef69609b317febe8aec6facb Mon Sep 17 00:00:00 2001 From: Marcus Campbell Date: Mon, 8 Jan 2007 07:26:37 +0000 Subject: [PATCH] * Updated isValidEmail regex to match plussed addresses --- services/userservice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/userservice.php b/services/userservice.php index 1e7ed46..82abaf0 100644 --- a/services/userservice.php +++ b/services/userservice.php @@ -335,7 +335,7 @@ class UserService { } function isValidEmail($email) { - if (eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$", $email)) { + if (eregi("^((?:(?:(?:\w[\.\-\+_]?)*)\w)+)\@((?:(?:(?:\w[\.\-_]?){0,62})\w)+)\.(\w{2,6})$", $email)) { list($emailUser, $emailDomain) = split("@", $email); // Check if the email domain has a DNS record -- 2.30.2