bp_core_new_user_activity( array $user )
Create a “became a registered user” activity item when a user activates his account.
Description
Parameters
- $user
-
(Required) Array of userdata passed to bp_core_activated_user hook.
Return
(bool)
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' ) ); }
Changelog
Version | Description |
---|---|
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.