Posted on December 16, 2013 , Last Modified on: December 16, 2013

Add a User to a perticular group when User account is activated

add_action( 'bp_core_activated_user', 'bpdev_join_group_on_signup');

function bpdev_join_group_on_signup( $user_id ){

    $group_id = 3;//change it to the group id you want the user to join

    groups_join_group( $group_id, $user_id );

}

#buddypress #bp-hacks