X-Git-Url: https://projects.mako.cc/source/scuttle/blobdiff_plain/5bcd594660941b2d4560da70788be17b52ef68eb..270046795d391a18ef69609b317febe8aec6facb:/services/userservice.php 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