projects
/
scuttle
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bcd594
)
* Updated isValidEmail regex to match plussed addresses
author
Marcus Campbell
<marcus.campbell@gmail.com>
Mon, 8 Jan 2007 07:26:37 +0000
(07:26 +0000)
committer
Marcus Campbell
<marcus.campbell@gmail.com>
Mon, 8 Jan 2007 07:26:37 +0000
(07:26 +0000)
services/userservice.php
patch
|
blob
|
history
diff --git
a/services/userservice.php
b/services/userservice.php
index 1e7ed46981a39e46b0a4370d2b8735246ffd65d5..82abaf085fc1fdce8b59f12768793812c3fbb28f 100644
(file)
--- 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
Benjamin Mako Hill
||
Want to submit a patch?