]> projects.mako.cc - scuttle/blobdiff - services/userservice.php
trunk, branches/version-0.7:
[scuttle] / services / userservice.php
index 1e7ed46981a39e46b0a4370d2b8735246ffd65d5..82abaf085fc1fdce8b59f12768793812c3fbb28f 100644 (file)
@@ -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

Benjamin Mako Hill || Want to submit a patch?