{"id":4398,"date":"2022-07-12T15:52:42","date_gmt":"2022-07-12T14:52:42","guid":{"rendered":"https:\/\/ibex.tech\/wordpress-sites\/?p=4398"},"modified":"2023-06-16T16:21:52","modified_gmt":"2023-06-16T15:21:52","slug":"member-information","status":"publish","type":"post","link":"https:\/\/ibex.tech\/wordpress-sites\/plugins\/buddypress\/members\/member-information","title":{"rendered":"Member information"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Get Username (users slug)<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$Username = bp_core_get_username($UserId);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Get xProfile fields Name<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$DisplayName = xprofile_get_field_data('Name', bp_loggedin_user_id() );<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Does member exist?<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  $user = get_user_by('email', $email);      \/\/Returns WP_User object on success, false on failure\n  if ($user !== False)\n  {\n    \/\/----- THIS USER IS ALREADY A MEMBER -----\n    $UserId = $user-&gt;ID;\n    \n  }<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Get Username (users slug) Get xProfile fields Name Does member exist?<\/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-4398","post","type-post","status-publish","format-standard","hentry","category-members"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4398","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=4398"}],"version-history":[{"count":5,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4398\/revisions"}],"predecessor-version":[{"id":4505,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4398\/revisions\/4505"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/media?parent=4398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/categories?post=4398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/tags?post=4398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}