From 2e5e0bdc78249957260b98e5bcb5508eec37a549 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 18 Jun 2015 13:30:26 +0000 Subject: [PATCH] When updating a user, only send email-change notification if email address is passed. The notification, introduced in [32380], was firing incorrectly (and throwing a PHP notice) when `wp_update_user()` was called without including 'user_email' in the update data. Props imath. Fixes #32684. See #32430. Built from https://develop.svn.wordpress.org/trunk@32838 git-svn-id: http://core.svn.wordpress.org/trunk@32809 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 f2529dccc2..c6410cb779 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -2158,7 +2158,7 @@ function wp_update_user($userdata) { $send_pass_change_email = apply_filters( 'send_pass_change_email', true, $user, $userdata ); } - if ( $user['user_email'] !== $userdata['user_email'] ) { + if ( isset( $userdata['user_email'] ) && $user['user_email'] !== $userdata['user_email'] ) { /** * Filter to stop the sending of the email change email. * diff --git a/wp-includes/version.php b/wp-includes/version.php index e3322fbf45..b5cd0084d1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32837'; +$wp_version = '4.3-alpha-32838'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.