Ticket #30647: 30647.diff
File 30647.diff, 881 bytes (added by , 9 years ago) |
---|
-
wp-includes/user.php
1783 1783 */ 1784 1784 $user_email = apply_filters( 'pre_user_email', $raw_user_email ); 1785 1785 1786 if ( ! $update && ! defined( 'WP_IMPORTING' ) && email_exists( $user_email ) ) { 1786 // If there is no update just check for email_exists and if there is update, check if current email and new email are same or not and check email_exists accordingly 1787 if ( ( ! $update || ( ! empty( $old_user_data ) && $user_email !== $old_user_data->user_email ) ) && ! defined( 'WP_IMPORTING' ) && email_exists( $user_email ) ) { 1787 1788 return new WP_Error( 'existing_user_email', __( 'Sorry, that email address is already used!' ) ); 1788 1789 } 1789 1790 $nickname = empty( $userdata['nickname'] ) ? $user_login : $userdata['nickname'];