Fix notice when creating users. Props coffee2code. fixes #14286

git-svn-id: https://develop.svn.wordpress.org/trunk@15799 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-10-13 20:26:43 +00:00
parent f850029280
commit 8da08f0073
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ function edit_user( $user_id = 0 ) {
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) );
} elseif ( !is_email( $user->user_email ) ) {
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e-mail address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
} elseif ( ( $owner_id = email_exists($user->user_email) ) && $owner_id != $user->ID ) {
} elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) {
$errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
}