Make WordPress Core

Changeset 14802


Ignore:
Timestamp:
05/22/2010 07:53:59 AM (14 years ago)
Author:
westi
Message:

Allow users to cancel email address changes. Fixes #13457 props mtdewvirus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r14374 r14802  
    7575        die();
    7676    }
     77} elseif ( is_multisite() && IS_PROFILE_PAGE && !empty( $_GET['dismiss'] ) && $current_user->ID . '_new_email' == $_GET['dismiss'] ) {
     78    delete_option( $current_user->ID . '_new_email' );
     79    wp_redirect( add_query_arg( array('updated' => 'true'), admin_url( 'profile.php' ) ) );
     80    die();
    7781}
    7882
     
    286290<tr>
    287291    <th><label for="email"><?php _e('E-mail'); ?> <span class="description"><?php _e('(required)'); ?></span></label></th>
    288     <td><input type="text" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" /></td>
     292    <td><input type="text" name="email" id="email" value="<?php echo esc_attr($profileuser->user_email) ?>" class="regular-text" />
     293    <?php
     294    $new_email = get_option( $current_user->ID . '_new_email' );
     295    if ( $new_email && $new_email != $current_user->user_email ) : ?>
     296    <div class="updated inline">
     297    <p><?php printf( __('There is a pending change of your e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_email['newemail'], esc_url( admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ) ) ); ?></p>
     298    </div>
     299    <?php endif; ?>
     300    </td>
    289301</tr>
    290302
Note: See TracChangeset for help on using the changeset viewer.