Multisite: Switch to a usermeta key for email confirmation.

To prevent inconsistent data across sites in a network the new email address is now stored in usermeta. Adds visual feedback for the case when an update has failed.
All existing options will be removed on a database upgrade.

Props MikeHansenMe, kovshenin, jeremyfelt, ocean90.
Fixes #23358.

git-svn-id: https://develop.svn.wordpress.org/trunk@36679 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2016-02-24 15:33:14 +00:00
parent b464a4ba3a
commit 8b8312f822
4 changed files with 36 additions and 18 deletions

View File

@@ -1668,12 +1668,20 @@ function upgrade_440() {
* @ignore
* @since 4.5.0
*
* @global int $wp_current_db_version
* @global int $wp_current_db_version
* @global wpdb $wpdb
*/
function upgrade_450() {
global $wp_current_db_version;
if ( $wp_current_db_version < 36180 )
global $wp_current_db_version, $wpdb;
if ( $wp_current_db_version < 36180 ) {
wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
}
// Remove unused email confirmation options, moved to usermeta.
if ( $wp_current_db_version < 36679 && is_multisite() ) {
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name REGEXP '^[0-9]+_new_email$'" );
}
}
/**