Make WordPress Core

Ticket #52976: 52976-user-email-case-insensitive.patch

File 52976-user-email-case-insensitive.patch, 847 bytes (added by sachinrajcp123, 6 weeks ago)
  • wp-includes/user.php

    diff --git a/wp-includes/user.php b/wp-includes/user.php
    index 9b4c1c7..e3a9f2a 100644
    a b function wp_update_user( $userdata ) { 
    24722472        }
    24732473
    24742474        // Updating user email address.
    2475         if ( isset( $userdata['user_email'] ) && $user->user_email !== $userdata['user_email'] ) {
     2475        if ( isset( $userdata['user_email'] ) && 0 !== strcasecmp( $user->user_email, $userdata['user_email'] ) ) {
    24762476                /**
    24772477                 * Fires immediately before the user email is changed.
    24782478                 *
    function wp_update_user( $userdata ) { 
    26012601        }
    26022602
    26032603        // If the email address has changed, send a notification.
    2604         if ( $user_email !== $old_user_data->user_email ) {
     2604        if ( 0 !== strcasecmp( $user_email, $old_user_data->user_email ) ) {
    26052605                /**
    26062606                 * Fires after the user email has changed.
    26072607                 *