This plugin allows you to prevent group access to a group based on Member Type (introduced in BP 2.2+).
- BuddyPress 2.2+
- Groups Component Activated
Once you have activated the plugin you need to create Member Types. You can do this in three ways:
- Go to Users > Profile Fields and create a new field with the type "Member Type"
- Add the Member Types you need and save the field
- Members who fill in this field are now assigned a Member Type based on this field value.
- Change the Field type of an existing field (this needs to be a Radio/Dropdown field) into a Member Type field.
- Go to Tools > BuddyPress and select Migrate/Reset xProfile data to member types
- Press Repare Items and all your members will be assigned the Member Type based on the field value.
- Follow the guide here: https://codex.buddypress.org/developer/member-types/
- Using this solution users are unable to change their member type themselves.
Once you have configured the Member Types users have the ability to restrict users with other members types from joining groups they have created.
- Public & Private Groups which are restricted are still shown in the Groups Directory. When a user with the wrong Member Type tries to join a restricted group they will be redirected to the Group directory and a message is shown
- Group Admins can remove the Group Restrictions after group creation if needed.
- You can write a custom explanation message for your restrictions by editing the xProfile field assigned to the Member Type on the Users > Profile Fields > Member Type Field Edit Screen
- Feature Request, Suggestions and Contributions welcome!