• Resolved cmsplay

    (@cmsplay)


    I have tried using the slug bp_group and bp_group_role, but after importing CSV, users are not made members of the specified BuddyPress group.

    I have double-checked formatting and all is correct. I am not using any unusual characters.

    My BuddyPress Groups are set to:

    Groups>EditGroup>Settings>Privacy>Private

    and

    Groups>EditGroup>Settings>Who can invite others to this group?>All group members

    I have also tried with BuddyPress Groups set to:

    Groups>EditGroup>Settings>Privacy>Public

    …same problem.

    What am I doing wrong please?

    • This topic was modified 4 years, 9 months ago by cmsplay.
Viewing 1 replies (of 1 total)
  • Plugin Author Javier Carazo

    (@carazo)

    @cmsplay,

    The part of the code who does this work is:

    elseif( $headers[ $i ] == 'bp_group' ){ // buddypress group
    									$groups = explode( ',', $data[ $i ] );
    									$groups_role = explode( ',', $data[ $positions[ 'bp_group_role' ] ] );
    
    								    for( $j = 0; $j < count( $groups ); $j++ ){
    								    	$group_id = BP_Groups_Group::group_exists( $groups[ $j ] );
    
    								    	if( !empty( $group_id ) ){
    								    		groups_join_group( $group_id, $user_id );
    
    								    		if( $groups_role[ $j ] == 'Moderator' ){
    								    			groups_promote_member( $user_id, $group_id, 'mod' );
    								    		}
    								    		elseif( $groups_role[ $j ] == 'Administrator' ){
    								    			groups_promote_member( $user_id, $group_id, 'admin' );
    								    		}
    								    	}
    								    }
    								    	
    								    continue;				    
    								}

    So what you have to include is:
    bp_group for the group
    bp_group_role for the role the user has in this group

Viewing 1 replies (of 1 total)
  • The topic ‘Membership of BuddyPress Groups Not Activating on CSV Import’ is closed to new replies.