Make WordPress Core

Changeset 15799


Ignore:
Timestamp:
10/13/2010 08:26:43 PM (14 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/user.php

    r15740 r15799  
    170170    } elseif ( !is_email( $user->user_email ) ) {
    171171        $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e-mail address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
    172     } elseif ( ( $owner_id = email_exists($user->user_email) ) && $owner_id != $user->ID ) {
     172    } elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) {
    173173        $errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
    174174    }
Note: See TracChangeset for help on using the changeset viewer.