From d321aeee5100504ac016ebe9c3229ac60cc2e2f9 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 10 Jul 2014 18:52:34 +0200 Subject: [PATCH] Remove User::isValidEmailAddr() (deprecated since 1.18) Change-Id: I3440e32768d03e9160e23b038b6f4dc830f78647 --- RELEASE-NOTES-1.24 | 1 + includes/User.php | 32 -------------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 70f6084b6f..00e4b747dd 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -228,6 +228,7 @@ changes to languages because of Bugzilla reports. * Removed Title::escapeCanonicalURL(). (deprecated since 1.19) * Removed Title::escapeLocalURL(). (deprecated since 1.19) * Removed Title::escapeFullURL(). (deprecated since 1.19) +* Removed User::isValidEmailAddr(). (deprecated since 1.18) ==== Renamed classes ==== * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/includes/User.php b/includes/User.php index 5a117bdde1..909a749444 100644 --- a/includes/User.php +++ b/includes/User.php @@ -892,38 +892,6 @@ class User implements IDBAccessObject { return $this->mPasswordExpires; } - /** - * Does a string look like an e-mail address? - * - * This validates an email address using an HTML5 specification found at: - * http://www.whatwg.org/html/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. - * - * Client-side forms will use the same standard validation rules via JS or - * HTML 5 validation; additional restrictions can be enforced server-side - * by extensions via the 'isValidEmailAddr' hook. - * - * Note that this validation doesn't 100% match RFC 2822, but is believed - * to be liberal enough for wide use. Some invalid addresses will still - * pass validation here. - * - * @param string $addr E-mail address - * @return bool - * @deprecated since 1.18 call Sanitizer::isValidEmail() directly - */ - public static function isValidEmailAddr( $addr ) { - wfDeprecated( __METHOD__, '1.18' ); - return Sanitizer::validateEmail( $addr ); - } - /** * Given unvalidated user input, return a canonical username, or false if * the username is invalid. -- 2.20.1