Ticket #6744: bp-settings-actions.php.patch
File bp-settings-actions.php.patch, 2.1 KB (added by , 9 years ago) |
---|
-
bp-settings-actions.php
100 100 101 101 bp_update_user_meta( bp_displayed_user_id(), 'pending_email_change', $pending_email ); 102 102 103 $activation_link = bp_displayed_user_domain() . bp_get_settings_slug() . '/?verify_email_change=' . $hash; 104 103 105 $email_text = sprintf( 104 106 __( 'Dear %1$s, 105 107 … … 116 118 %6$s', 'buddypress' ), 117 119 bp_core_get_user_displayname( bp_displayed_user_id() ), 118 120 bp_get_site_name(), 119 esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/?verify_email_change=' . $hash),121 esc_url( $activation_link ), 120 122 $user_email, 121 123 bp_get_site_name(), 122 124 bp_get_root_domain() … … 133 135 * @param string $old_user_email Existing email address 134 136 * for the current user. 135 137 * @param WP_User $update_user Userdata object for the current user. 138 * @param string $activation_link The link to complete the change. 136 139 */ 137 $content = apply_filters( 'bp_new_user_email_content', $email_text, $user_email, $old_user_email, $update_user ); 140 $content = apply_filters( 'bp_new_user_email_content', $email_text, $user_email, $old_user_email, $update_user, $activation_link ); 141 142 $email_subject = sprintf( __( '[%s] Verify your new email address', 'buddypress' ), wp_specialchars_decode( bp_get_site_name() ) ); 138 143 144 /** 145 * Filter the email subject sent when a user changes emails. 146 * 147 * @since 2.4.1 148 * 149 * @param string $email_subject Subject of the email. 150 */ 151 $subject = apply_filters( 'bp_new_user_email_subject', $email_subject ); 152 139 153 // Send the verification email 140 wp_mail( $user_email, sprintf( __( '[%s] Verify your new email address', 'buddypress' ), wp_specialchars_decode( bp_get_site_name() ) ), $content );154 wp_mail( $user_email, $subject, $content ); 141 155 142 156 // We mark that the change has taken place so as to ensure a 143 157 // success message, even though verification is still required