* Removed the troublesome regular expression in isValidEmailAddr which returns

true now no matter what input it gets, see bug 959.
This commit is contained in:
Ævar Arnfjörð Bjarmason 2005-04-23 21:20:09 +00:00
parent d4242ce861
commit 8b37fbcd2e

View file

@ -118,11 +118,17 @@ class User {
/**
* does the string match roughly an email address ?
*
* @bug 959
*
* @param string $addr email address
* @static
* @return bool
*/
function isValidEmailAddr ( $addr ) {
return preg_match( '/^([a-z0-9_.-]+([a-z0-9_.-]+)*\@[a-z0-9_-]+([a-z0-9_.-]+)*([a-z.]{2,})+)$/', strtolower($addr));
# There used to be a regular expression here, it got removed because it
# rejected valid addresses.
return true;
}
/**