Performance improvements using strpos. Fixes #7611 and #7610 props johnbillion.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi
2008-08-27 20:47:01 +00:00
parent 18a0bc103f
commit 00583d64eb
4 changed files with 4 additions and 4 deletions

View File

@@ -103,7 +103,7 @@ function retrieve_password() {
if ( empty( $_POST['user_login'] ) && empty( $_POST['user_email'] ) )
$errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.'));
if ( strstr($_POST['user_login'], '@') ) {
if ( strpos($_POST['user_login'], '@') ) {
$user_data = get_user_by_email(trim($_POST['user_login']));
if ( empty($user_data) )
$errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));