Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Need to check if bp_profile_field_data() has data


Roger Coathup
Participant

@rogercoathup

Have you tried calling bp_get_profile_field_data and testing against NULL / empty string?

Here’s its definition:

function bp_get_profile_field_data( $args = ” ) {
$defaults = array(
‘field’ => false, // Field name or ID.
‘user_id’ => $bp->displayed_user->id
);

..
}

Most of the template tags have a “get” version that doesn’t echo the result.

Skip to toolbar