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:
parent
0deed4b842
commit
6b034b67f5
@ -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`
|
* check if current email and new email are the same, or not, and check `email_exists`
|
||||||
* accordingly.
|
* 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' )
|
&& ! defined( 'WP_IMPORTING' )
|
||||||
&& email_exists( $user_email )
|
&& email_exists( $user_email )
|
||||||
) {
|
) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user