Allow duplicate emails (generally empty) if WP_IMPORTING to restore 2.9 behavior. props blepoxp, yoavf. fixes #13130. see r12778.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
96a0afbc4a
commit
2bf6d14767
|
@ -140,7 +140,7 @@ function wp_insert_user($userdata) {
|
|||
$user_email = '';
|
||||
$user_email = apply_filters('pre_user_email', $user_email);
|
||||
|
||||
if ( !$update && email_exists($user_email) )
|
||||
if ( !$update && ! defined( 'WP_IMPORTING' ) && email_exists($user_email) )
|
||||
return new WP_Error('existing_user_email', __('This email address is already registered.') );
|
||||
|
||||
if ( empty($display_name) )
|
||||
|
|
Loading…
Reference in New Issue