bp_core_activated_user

  • do_action( 'bp_core_activated_user', $user_id, $key, $user )

    Source Reference:

    • Component: BuddyPress:: bp-members
      File: /bp-members/bp-members-signup.php :: Trac Source Line: 500
      	wp_update_user( array( 'ID' => $user_id, 'display_name' => bp_core_get_user_displayname( $user_id ) ) );
      
      	// Set the password on multisite installs
      	if ( is_multisite() && !empty( $user['meta']['password'] ) )
      		$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_pass = %s WHERE ID = %d", $user['meta']['password'], $user_id ) );
      
      	// Delete the total member cache
      	wp_cache_delete( 'bp_total_member_count', 'bp' );
      
      	do_action( 'bp_core_activated_user', $user_id, $key, $user );
      
      	return $user_id;
      }
      
      function bp_core_new_user_activity( $user ) {
      	if ( empty( $user ) || !bp_is_active( 'activity' ) )
      		return false;
      
      	if ( is_array( $user ) )
      		$user_id = $user['user_id'];
      

Hook: add_action: bp_core_activated_user instances (1)

  • add_action( 'bp_core_activated_user', 'bp_core_new_user_activity' )
    $function_to_add: bp_core_new_user_activity
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-signup.php :: Trac Source Line: 526
      	$userlink = bp_core_get_userlink( $user_id );
      
      	bp_activity_add( array(
      		'user_id'   => $user_id,
      		'action'    => apply_filters( 'bp_core_activity_registered_member_action', sprintf( __( '%s became a registered member', 'buddypress' ), $userlink ), $user_id ),
      		'component' => 'xprofile',
      		'type'      => 'new_member'
      	) );
      }
      add_action( 'bp_core_activated_user', 'bp_core_new_user_activity' );
      
      function bp_core_map_user_registration( $user_id ) {
      	// Only map data when the site admin is adding users, not on registration.
      	if ( !is_admin() )
      		return false;
      
      	// Add the user's fullname to Xprofile
      	if ( bp_is_active( 'xprofile' ) ) {
      		$firstname = get_user_meta( $user_id, 'first_name', true );
      		$lastname = ' ' . get_user_meta( $user_id, 'last_name', true );
      

Comments are closed.