Make WordPress Core

Ticket #32158: 32158.diff

File 32158.diff, 616 bytes (added by pareshradadiya, 7 years ago)

Case insensitive comparison of new email id with an user's old email id

  • src/wp-includes/user.php

     
    18991899         * check if current email and new email are the same, or not, and check `email_exists`
    19001900         * accordingly.
    19011901         */
    1902         if ( ( ! $update || ( ! empty( $old_user_data ) && $user_email !== $old_user_data->user_email ) )
     1902        if ( ( ! $update || ( ! empty( $old_user_data ) && strcasecmp( $user_email, $old_user_data->user_email ) !== 0 ) )
    19031903                && ! defined( 'WP_IMPORTING' )
    19041904                && email_exists( $user_email )
    19051905        ) {