Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_get_member_profile_data not working on Full Activity feed


  • danpkraus
    Participant

    @danpkraus

    Hi All,
    I am trying to access a bit of user profile data on the full site activity feed/page in the post update form. It works fine when I am using/viewing the member feed/post update form. I need to get this information to turn on Geo location for each update based on the user’s setting. I’ll eventually make this into a plugin but am just going through the motions right now.

    Here’s my code:
    `
    //START geo location of user if posting an update
    if( !bp_is_group() ):

    global $bp;

    $userid = $bp->loggedin_user->id;
    echo ‘

    USER ID: ‘.$userid.’

    ‘;//#for testing

    //get user “Use Location” profile input value
    $use_location = bp_get_member_profile_data( ‘user_id=’.$userid.’&field=Use Location’ );//#doesn’t work on full site activity

    if( $use_location == ‘On’ ):

    echo ‘

    USE LOCATION is ON

    ‘;//#for testing

    //print out hidden fields for geo location data

    //save/update geo location data as meta for the activity

    endif;

    endif;//!bp_is_group
    //END geo location data
    `
    Any help or direction is greatly appreciated! Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘bp_get_member_profile_data not working on Full Activity feed’ is closed to new replies.
Skip to toolbar