bp_core_signup_send_validation_email( int|bool $user_id, string $user_email, string $key, string $salutation = '' )
Send activation email to a newly registered user.
Description Description
Parameters Parameters
- $user_id
-
(Required) ID of the new user, false if BP_SIGNUPS_SKIP_USER_CREATION is true.
- $user_email
-
(Required) Email address of the new user.
- $key
-
(Required) Activation key.
- $salutation
-
(Optional) The name to be used as a salutation in the email.
Default value: ''
Source Source
File: bp-members/bp-members-functions.php
function bp_core_signup_send_validation_email( $user_id, $user_email, $key, $salutation = '' ) { $args = array( 'tokens' => array( 'activate.url' => esc_url( trailingslashit( bp_get_activation_page() ) . "{$key}/" ), 'key' => $key, 'user.email' => $user_email, 'user.id' => $user_id, ), ); $to = array( array( $user_email => $salutation ) ); bp_send_email( 'core-user-registration', $to, $args ); }
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Change $user_login parameter to more general $salutation. |
2.5.0 | Add the $user_login parameter. |
1.2.2 | Introduced. |