Changeset 12349 for trunk/src/bp-members/bp-members-functions.php
- Timestamp:
- 03/01/2019 02:33:56 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-functions.php
r11829 r12349 1742 1742 */ 1743 1743 if ( apply_filters( 'bp_core_signup_send_activation_key', true, $user_id, $user_email, $activation_key, $usermeta ) ) { 1744 bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key, $user_login ); 1744 $salutation = $user_login; 1745 if ( isset( $usermeta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) { 1746 $salutation = $usermeta[ 'field_' . bp_xprofile_fullname_field_id() ]; 1747 } 1748 1749 bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key, $salutation ); 1745 1750 } 1746 1751 } … … 2159 2164 * @since 1.2.2 2160 2165 * @since 2.5.0 Add the $user_login parameter. 2166 * @since 5.0.0 Change $user_login parameter to more general $salutation. 2161 2167 * 2162 2168 * @param int|bool $user_id ID of the new user, false if BP_SIGNUPS_SKIP_USER_CREATION is true. 2163 * @param string $user_email Email address of the new user.2164 * @param string $key Activation key.2165 * @param string $ user_login Optional. The user login name.2166 */ 2167 function bp_core_signup_send_validation_email( $user_id, $user_email, $key, $ user_login = '' ) {2169 * @param string $user_email Email address of the new user. 2170 * @param string $key Activation key. 2171 * @param string $salutation Optional. The name to be used as a salutation in the email. 2172 */ 2173 function bp_core_signup_send_validation_email( $user_id, $user_email, $key, $salutation = '' ) { 2168 2174 $args = array( 2169 2175 'tokens' => array( … … 2175 2181 ); 2176 2182 2177 if ( $user_id ) { 2178 $to = $user_id; 2179 } else { 2180 $to = array( array( $user_email => $user_login ) ); 2181 } 2183 $to = array( array( $user_email => $salutation ) ); 2182 2184 2183 2185 bp_send_email( 'core-user-registration', $to, $args );
Note: See TracChangeset
for help on using the changeset viewer.