From 6b034b67f5c1a1f0375dc7a716864e77724a624d Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 7 Jul 2015 19:29:24 +0000 Subject: [PATCH] In `wp_insert_user()`, comparing an email address against the user's old email address should not be case-sensitive. Adds unit tests. Props tyxla. Fixes #32158. Built from https://develop.svn.wordpress.org/trunk@33115 git-svn-id: http://core.svn.wordpress.org/trunk@33086 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 1c8a5b36d4..fca15065f0 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -1945,7 +1945,7 @@ function wp_insert_user( $userdata ) { * check if current email and new email are the same, or not, and check `email_exists` * accordingly. */ - if ( ( ! $update || ( ! empty( $old_user_data ) && $user_email !== $old_user_data->user_email ) ) + if ( ( ! $update || ( ! empty( $old_user_data ) && 0 !== strcasecmp( $user_email, $old_user_data->user_email ) ) ) && ! defined( 'WP_IMPORTING' ) && email_exists( $user_email ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index aa6a25fb0c..a7f17a7a9f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-beta1-33114'; +$wp_version = '4.3-beta1-33115'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.