diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
index 9a362103c..9cb293e1d 100644
|
|
|
function bp_send_email( $email_type, $to, $args = array() ) {
|
| 3155 | 3155 | } |
| 3156 | 3156 | |
| 3157 | 3157 | // From, subject, content are set automatically. |
| 3158 | | $email->set_to( $to ); |
| | 3158 | if ( 'settings-verify-email-change' === $email_type && isset( $args['tokens']['displayname'] ) ) { |
| | 3159 | $email->set_to( $to, $args['tokens']['displayname'] ); |
| | 3160 | } else { |
| | 3161 | $email->set_to( $to ); |
| | 3162 | } |
| | 3163 | |
| 3159 | 3164 | $email->set_tokens( $args['tokens'] ); |
| 3160 | 3165 | |
| 3161 | 3166 | /** |
diff --git src/bp-settings/actions/general.php src/bp-settings/actions/general.php
index 62a6c9e9c..6de596d6f 100644
|
|
|
function bp_settings_action_general() {
|
| 110 | 110 | 'verify.url' => esc_url( $verify_link ), |
| 111 | 111 | ), |
| 112 | 112 | ); |
| 113 | | bp_send_email( 'settings-verify-email-change', bp_displayed_user_id(), $args ); |
| | 113 | bp_send_email( 'settings-verify-email-change', $user_email, $args ); |
| 114 | 114 | |
| 115 | 115 | // We mark that the change has taken place so as to ensure a |
| 116 | 116 | // success message, even though verification is still required. |
diff --git src/bp-settings/bp-settings-template.php src/bp-settings/bp-settings-template.php
index a97c0da52..89edbc02d 100644
|
|
|
function bp_settings_pending_email_notice() {
|
| 92 | 92 | <br /> |
| 93 | 93 | <?php printf( |
| 94 | 94 | __( 'Check your email (%1$s) for the verification link, or <a href="%2$s">cancel the pending change</a>.', 'buddypress' ), |
| 95 | | '<code>' . esc_html( bp_get_displayed_user_email() ) . '</code>', |
| | 95 | '<code>' . esc_html( $pending_email['newemail'] ) . '</code>', |
| 96 | 96 | esc_url( wp_nonce_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/?dismiss_email_change=1', 'bp_dismiss_email_change' ) ) |
| 97 | 97 | ); ?></p> |
| 98 | 98 | </div> |