Simple call to xprofiles data
I’m trying to get a handle on just how the data in xprofiles works and how to pull it out for my purpose. Maybe someone can help me on this easy task (and then i can learn to expand this out).
I have 2 fields in xprofiles and simply want to grab that for a given user. Will this function work to do that? If so, where would I store this function in order to make use of the bp_get_field_data function that it relies on. It this is wrong, how should it be change?
$user[‘First Name’] = bp_get_field_data(‘First Name’, $site_members_template->member->ID);
$user[‘Last Name’] = bp_get_field_data(‘Last Name’, $site_members_template->member->ID);
echo $user[‘First Name’].’ ‘.$user[‘Last Name’];
- The topic ‘Simple call to xprofiles data’ is closed to new replies.