Changeset 12928 for trunk/wp-admin/includes/ms.php
- Timestamp:
- 02/02/2010 06:00:45 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/ms.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r12920 r12928 267 267 add_action('update_option_new_admin_email', 'update_option_new_admin_email', 10, 2); 268 268 269 function update_profile_email() {270 global $current_user, $wpdb;271 if ( isset( $_GET[ 'newuseremail' ] ) && $current_user->ID ) {272 $new_email = get_option( $current_user->ID . '_new_email' );273 if ( $new_email[ 'hash' ] == $_GET[ 'newuseremail' ] ) {274 $user->ID = $current_user->ID;275 $user->user_email = wp_specialchars( trim( $new_email[ 'newemail' ] ) );276 if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $current_user->user_login ) ) )277 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $user->user_email, $current_user->user_login ) );278 wp_update_user( get_object_vars( $user ) );279 delete_option( $current_user->ID . '_new_email' );280 wp_redirect( add_query_arg( array('updated' => 'true'), admin_url( 'profile.php' ) ) );281 die();282 }283 }284 }285 286 269 function send_confirmation_on_profile_email() { 287 270 global $errors, $wpdb, $current_user, $current_site; … … 804 787 } 805 788 806 if ( strpos( $_SERVER['PHP_SELF'], 'profile.php' ) ) {807 add_action( 'admin_init', 'update_profile_email' );808 }809 810 789 function stripslashes_from_options( $blog_id ) { 811 790 global $wpdb;
Note: See TracChangeset
for help on using the changeset viewer.