{"id":4345,"date":"2022-07-01T16:02:31","date_gmt":"2022-07-01T15:02:31","guid":{"rendered":"https:\/\/ibex.tech\/wordpress-sites\/?p=4345"},"modified":"2022-07-07T09:56:43","modified_gmt":"2022-07-07T08:56:43","slug":"member-type","status":"publish","type":"post","link":"https:\/\/ibex.tech\/wordpress-sites\/plugins\/buddypress\/members\/member-type","title":{"rendered":"Member Type"},"content":{"rendered":"\n<p>BuddyPress lets you define different types of users within the WP admin panel. These are separate from the WordPress user types.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Set Member Type On Signup<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/*****************************************************\n\/\/*****************************************************\n\/\/********** NEW USER REGISTRATION COMPLETED **********\n\/\/*****************************************************\n\/\/*****************************************************\nadd_action('bp_core_signup_user', 'myplugin_bp_core_signup_user', 10, 5);\nfunction myplugin_bp_core_signup_user ($user_id, $user_login, $user_password, $user_email, $usermeta)\n{\n  \n  \/\/----- SET THE BUDDYPRESS USER TYPE -----\n  \/\/(You can set this now even though the user still needs to activate their account)\n  bp_set_member_type($user_id, 'my-member-type-id');\n  \n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Get Member Type<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  $member_type = bp_get_member_type( bp_displayed_user_id() );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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 Get Member Type<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[361],"tags":[],"class_list":["post-4345","post","type-post","status-publish","format-standard","hentry","category-members"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/comments?post=4345"}],"version-history":[{"count":6,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4345\/revisions"}],"predecessor-version":[{"id":4357,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4345\/revisions\/4357"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/media?parent=4345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/categories?post=4345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/tags?post=4345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}