BuddyDev

Search

With BuddyPress Member Types Pro, you can force users to auto join BuddyPress groups while registering account or changing member type. The groups are based on member types.

One issue that you may face is the BuddyPress Member Types Pro won’t remove users from existing groups when their member type changes.

This is due to a few limitation/inconsistency in current implementation of member types in BuddyPress.

  • BuddyPress does not provide the details about previous member types of user when firing the bp_set_member_type action.
  • Inconsistency in removing member types sometimes. People sometime use bp_remove_member_type() and sometimes bp_set_member_type() with empty string for member type.
  • Also, It is possible to have multiple member types for a user but there is no guaranteed way to know if the currently setting member type is the last of the multi member type change.

Due to these issues, we do not include the code to remove users from groups based on member type. It can create a situation where the overall experience is not what an admin will expect.

It is still possible to ensure that the users only belong to groups dictated by their current member type.

You may put this code in your bp-custom.php

Please do know that if you have “Multipl member Types” enabled, you will notice some user leaving/joining their already existing groups. This happens since we ensure the member type for each member type individually.