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
This commit is contained in:
Scott Taylor 2015-07-07 19:29:24 +00:00
parent 0deed4b842
commit 6b034b67f5
2 changed files with 2 additions and 2 deletions

View File

@ -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 )
) {

View File

@ -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.