Omega get profile data

<?php
// Get Profile Data
function omega_get_profile_data($user_id,$chosen_fieldname){
if (bp_has_profile('user_id=' . $user_id)) :
while (bp_profile_groups()) : bp_the_profile_group();
while (bp_profile_fields()) : bp_the_profile_field();
if (bp_field_has_data()) :
$fieldname = bp_get_the_profile_field_name();
if($fieldname == $chosen_fieldname){$return_value = strip_tags(bp_get_the_profile_field_value());}
endif;
endwhile;
endwhile;
endif;

return $return_value;
}
?>

1 Comment

You must be logged in to post a comment.


  1. [...] copied from: http://code.hyperspatial.com/ This entry was posted in buddypress. Bookmark the permalink. Post a comment or leave a trackback: [...]