Users: After [41163], add a notice for Email field on Profile screen that the new address will not become active until confirmed.

Props dilipbheda.
Fixes #43106. See #16470.

git-svn-id: https://develop.svn.wordpress.org/trunk@42688 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-02-11 12:22:21 +00:00
parent 6e95cf3403
commit 21258c9bc7
1 changed files with 9 additions and 1 deletions

View File

@ -485,8 +485,16 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
<table class="form-table">
<tr class="user-email-wrap">
<th><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
<td><input type="email" name="email" id="email" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text ltr" />
<td><input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profileuser->user_email ); ?>" class="regular-text ltr" />
<?php
if ( $profileuser->ID == $current_user->ID ) :
?>
<p class="description" id="email-description">
<?php _e( 'If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?>
</p>
<?php
endif;
$new_email = get_user_meta( $current_user->ID, '_new_email', true );
if ( $new_email && $new_email['newemail'] != $current_user->user_email && $profileuser->ID == $current_user->ID ) :
?>