BuddyDev

Search

[Resolved] Member types pro – assign to roles

  • Participant
    Level: Enlightened
    Posts: 33
    Erwin Van den Bogaert on #29444

    Hi,

    because it is not possible to enter the member types via webhook (zapier) because the xprofile meta is not visible, I have now created several roles with the same name in addition to member types. Roles can be added via webhook (‘role’, additional_roles’).

    Now I have roles per location and seniority. The aim is to immediately add these roles and member types to corresponding groups when registering via webhook (our workforce in Airtable).

    I have set it up so that the member types are linked to the roles.

    If I now create a user with 2 roles (eg Ghent, Senior) I see that the members plugin has passed only 1 of the 2 roles to member types.

    Is there some way I can fix this?

    (I’ve been doing this for a while now, I don’t understand why it’s so hard to see the xprofile meta data in buddypress, but well I’m looking for a workaround.)

  • Keymaster
    (BuddyDev Team)
    Posts: 24232
    Brajesh Singh on #29455

    Hi,
    Our plugin is enabled to only consider the effect of last role. So, even when you add multiple roles, we remove member types assigned by previous roles and only the last role’s member type is added.

    If you do not want this behaviour, Please comment the following line in buddypress-member-types-pro/modules/class-bpmpt-roles-helper.php from line 220 to 223 as shown below.

    
    
    		// remove all member types?
    		// if ( bp_get_member_type( $user_id ) ) {
    		// 	bp_set_member_type( $user_id, '' );
    		// }
    
    

    we use // to comment the line. I will consider adding a filter in future to enable this behaviour.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 33
    Erwin Van den Bogaert on #29465

    Yes, that works.

    Thanks!

  • Keymaster
    (BuddyDev Team)
    Posts: 24232
    Brajesh Singh on #29474

    Thank you for confirming.

    Regards
    Brajesh

The topic ‘ [Resolved] Member types pro – assign to roles’ is closed to new replies.

This topic is: resolved