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());
AND
$role = bp_get_profile_field_data(
array(
‘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 ?
Thanks
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Get xprofile field value in functions.php’ is closed to new replies.