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() );
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

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