From 8da08f007376eb5fce319d844f0687ad8967a385 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 13 Oct 2010 20:26:43 +0000 Subject: [PATCH] Fix notice when creating users. Props coffee2code. fixes #14286 git-svn-id: https://develop.svn.wordpress.org/trunk@15799 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 7c01fa7106..bd4daa899c 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -169,7 +169,7 @@ function edit_user( $user_id = 0 ) { $errors->add( 'empty_email', __( 'ERROR: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) ); } elseif ( !is_email( $user->user_email ) ) { $errors->add( 'invalid_email', __( 'ERROR: The e-mail address isn’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', __('ERROR: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) ); }