From: Antoine Musso Date: Mon, 24 Jan 2011 20:31:16 +0000 (+0000) Subject: User::isValidEmailAddr comment update X-Git-Tag: 1.31.0-rc.0~32386 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=e1be34e477f9abfacd42cbf7d8350e287af82757;p=lhc%2Fweb%2Fwiklou.git User::isValidEmailAddr comment update Follow up r75682 --- diff --git a/includes/User.php b/includes/User.php index 184362db91..104d0623cb 100644 --- a/includes/User.php +++ b/includes/User.php @@ -638,9 +638,15 @@ class User { /** * Does a string look like an e-mail address? * - * There used to be a regular expression here, it got removed because it - * rejected valid addresses. Actually just check if there is '@' somewhere - * in the given address. + * This validate an email address using an HTML5 specification found at: + * http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address + * Which as of 2011-01-24 says: + * A valid e-mail address is a string that matches the ABNF production + * 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined + * in RFC 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section + * 3.5. + * This function is an implementation of the specification as requested in + * bug 22449. * * @todo Check for RFC 2822 compilance (bug 959) *