Index: trunk/phase3/includes/User.php |
— | — | @@ -497,7 +497,7 @@ |
498 | 498 | } |
499 | 499 | |
500 | 500 | /** |
501 | | - * Does the string match roughly an email address ? |
| 501 | + * Does a string look like an email address? |
502 | 502 | * |
503 | 503 | * There used to be a regular expression here, it got removed because it |
504 | 504 | * rejected valid addresses. Actually just check if there is '@' somewhere |
— | — | @@ -506,12 +506,10 @@ |
507 | 507 | * @todo Check for RFC 2822 compilance (bug 959) |
508 | 508 | * |
509 | 509 | * @param string $addr email address |
510 | | - * @static |
511 | 510 | * @return bool |
512 | 511 | */ |
513 | | - static function isValidEmailAddr ( $addr ) { |
514 | | - return ( trim( $addr ) != '' ) && |
515 | | - (false !== strpos( $addr, '@' ) ); |
| 512 | + public static function isValidEmailAddr( $addr ) { |
| 513 | + return strpos( $addr, '@' ) !== false; |
516 | 514 | } |
517 | 515 | |
518 | 516 | /** |