Member Type API

BuddyPress 2.2 will introduce the basics of a Member Type API. The primary goal of the API is to provide a common framework for the storage and retrieval of arbitrary member types, a common task on BuddyPress sites. See #6006 for more background.

The new Member Types page on the BP Codex outlines the details of the API, so that developers can get acquainted with the new tools.

In BuddyPress 2.2, BP will provide native support for a number of features beyond the mere fetching/storage of member type data. When BP detects that member types have been registered by a plugin/theme, the following items will be exposed:

  • Member queries (bp_has_members() and BP_User_Query) can be filtered by 'member_type'. This allows developers to filter member lists in directories and elsewhere.
  • A Member Type metabox will appear on each user’s Community Profile page in Dashboard > Users. Admins can use this metabox to view and change the member type for the current user.

We think that these tools will serve as the foundation for various new features in plugins, themes, and in future versions of BP itself. See, for example, #5192 (show different xprofile fields to different types of members) and #6060 (on Dashboard > Users, display member types and allow filtering by member type). Developers: as you start using this framework, we hope you’ll provide us with feedback and ideas for improving it in future releases.

#2-2, #member-types