bp_core_new_user_activity( array $user )

Create a “became a registered user” activity item when a user activates his account.


Parameters Parameters

$user

(array) (Required) Array of userdata passed to bp_core_activated_user hook.


Top ↑

Return Return

(bool)


Source Source

File: bp-members/bp-members-activity.php

function bp_core_new_user_activity( $user ) {
	if ( empty( $user ) ) {
		return false;
	}

	if ( is_array( $user ) ) {
		$user_id = $user['user_id'];
	} else {
		$user_id = $user;
	}

	if ( empty( $user_id ) ) {
		return false;
	}

	bp_activity_add( array(
		'user_id'   => $user_id,
		'component' => buddypress()->members->id,
		'type'      => 'new_member'
	) );
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.2.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.