BuddyPress lets you define different types of users within the WP admin panel. These are separate from the WordPress user types.

Set Member Type On Signup

//*****************************************************
//*****************************************************
//********** NEW USER REGISTRATION COMPLETED **********
//*****************************************************
//*****************************************************
add_action('bp_core_signup_user', 'myplugin_bp_core_signup_user', 10, 5);
function myplugin_bp_core_signup_user ($user_id, $user_login, $user_password, $user_email, $usermeta)
{
  
  //----- SET THE BUDDYPRESS USER TYPE -----
  //(You can set this now even though the user still needs to activate their account)
  bp_set_member_type($user_id, 'my-member-type-id');
  
}

Get Member Type

  $member_type = bp_get_member_type( bp_displayed_user_id() );
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *