Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Default Groups on signup

@ageeshkg

Member

do you want to create members and add the to specific groups while creating them?

this piece of code may help you in adding the user to group.

//this will give the groups for the logged in user.

$groupIDs = get_userGroups($bp);

//from the groupIDs you can create the group object

$group = new BP_Groups_Group( $group_id )

//make the user assigned to the specific group. pass the user id of the new member

groups_join_group($groupID,$user_id);

Skip to toolbar