Get xprofile field value in functions.php
Hi Guys !
I need to get the value of the “Role” xprofile field of the current logged in user in the functions.php file (It’s located in bp-themes\bp-default\)
I tried the following stuff :
$role = xprofile_get_field_data(“Role”, bp_get_group_member_id());
$role = bp_get_profile_field_data(
‘field’ => “Role”, // where 1 is the field_id or it can be the field name
‘user_id’ => bp_get_group_member_id()
But none is working. Do you have any ideas ?
You must be logged in to reply to this topic.