Skip to:
Content

BuddyPress.org

Ticket #8138: 8138.2.patch

File 8138.2.patch, 2.0 KB (added by imath, 7 years ago)
  • src/bp-core/bp-core-functions.php

    diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
    index e619f5013..4fd977039 100644
    function bp_send_email( $email_type, $to, $args = array() ) {  
    31513151        }
    31523152
    31533153        // From, subject, content are set automatically.
    3154         $email->set_to( $to );
     3154        if ( 'settings-verify-email-change' === $email_type && isset( $args['tokens']['displayname'] ) ) {
     3155                $email->set_to( $to, $args['tokens']['displayname'] );
     3156        } else {
     3157                $email->set_to( $to );
     3158        }
     3159
    31553160        $email->set_tokens( $args['tokens'] );
    31563161
    31573162        /**
  • src/bp-settings/actions/general.php

    diff --git src/bp-settings/actions/general.php src/bp-settings/actions/general.php
    index 62a6c9e9c..6de596d6f 100644
    function bp_settings_action_general() {  
    110110                                                        'verify.url'     => esc_url( $verify_link ),
    111111                                                ),
    112112                                        );
    113                                         bp_send_email( 'settings-verify-email-change', bp_displayed_user_id(), $args );
     113                                        bp_send_email( 'settings-verify-email-change', $user_email, $args );
    114114
    115115                                        // We mark that the change has taken place so as to ensure a
    116116                                        // success message, even though verification is still required.
  • src/bp-settings/bp-settings-template.php

    diff --git src/bp-settings/bp-settings-template.php src/bp-settings/bp-settings-template.php
    index dea0abc56..4c9215931 100644
    function bp_settings_pending_email_notice() {  
    9898                        printf(
    9999                                /* translators: 1: email address. 2: cancel email change url. */
    100100                                __( 'Check your email (%1$s) for the verification link, or <a href="%2$s">cancel the pending change</a>.', 'buddypress' ),
    101                                 '<code>' . esc_html( bp_get_displayed_user_email() ) . '</code>',
     101                                '<code>' . esc_html( $pending_email['newemail'] ) . '</code>',
    102102                                esc_url( wp_nonce_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/?dismiss_email_change=1', 'bp_dismiss_email_change' ) )
    103103                        );
    104104                        ?>