Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Automatically activate new registered users in the panel

@anonymized-6594935

Inactive

I see, you can try the following code:


/**
 * Adds activities generated when a user activates their account when a user
 * is created using the WP REST API.
 */
function rest_automatically_generate_an_activation_activity( $user ) {
	// Adds a "became a registered user" activity.
	bp_core_new_user_activity( $user->ID );

	// Fake a user log in.
	bp_update_user_last_activity( $user->ID );
}
add_action( 'rest_insert_user', 'rest_automatically_generate_an_activation_activity' );
Skip to toolbar