bp_core_signup_send_validation_email( int|bool $user_id, string $user_email, string $key, string $user_login = '' )
Send activation email to a newly registered user.
Description
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.
- $user_login
-
(Optional) The user login name.
Default value: ''
Source
File: bp-members/bp-members-functions.php
function bp_core_signup_send_validation_email( $user_id, $user_email, $key, $user_login = '' ) { $args = array( 'tokens' => array( 'activate.url' => esc_url( trailingslashit( bp_get_activation_page() ) . "{$key}/" ), 'key' => $key, 'user.email' => $user_email, 'user.id' => $user_id, ), ); if ( $user_id ) { $to = $user_id; } else { $to = array( array( $user_email => $user_login ) ); } bp_send_email( 'core-user-registration', $to, $args ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.5.0 Add the $user_login parameter. | BuddyPress 2.5.0 Add the $user_login parameter. |
BuddyPress 1.2.2 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.