Skip to:
Content

BuddyPress.org

Changeset 12603


Ignore:
Timestamp:
03/29/2020 04:09:52 PM (6 years ago)
Author:
imath
Message:

Send the "email change" confirmation message to the new email

To be consistent with how the email change confirmation message is handled by WordPress, we need to send it to the new email and not to the current email.

Props laudag, espellcaste

Fixes #8138

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-functions.php

    r12588 r12603  
    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
  • trunk/src/bp-settings/actions/general.php

    r11926 r12603  
    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
  • trunk/src/bp-settings/bp-settings-template.php

    r12594 r12603  
    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            );
Note: See TracChangeset for help on using the changeset viewer.