Make WordPress Core


Ignore:
Timestamp:
02/24/2016 03:33:14 PM (9 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r36416 r36679  
    16691669 * @since 4.5.0
    16701670 *
    1671  * @global int $wp_current_db_version
     1671 * @global int  $wp_current_db_version
     1672 * @global wpdb $wpdb
    16721673 */
    16731674function upgrade_450() {
    1674     global $wp_current_db_version;
    1675     if ( $wp_current_db_version < 36180 )
     1675    global $wp_current_db_version, $wpdb;
     1676
     1677    if ( $wp_current_db_version < 36180 ) {
    16761678        wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
     1679    }
     1680
     1681    // Remove unused email confirmation options, moved to usermeta.
     1682    if ( $wp_current_db_version < 36679 && is_multisite() ) {
     1683        $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name REGEXP '^[0-9]+_new_email$'" );
     1684    }
    16771685}
    16781686
Note: See TracChangeset for help on using the changeset viewer.