mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@33115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 )
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user