Skip to:
Content
Pages
Categories
Search
Top
Bottom

Getting wrong avatar on likes


  • tbako
    Participant

    @tbako

    Hi guys, how are you?

    I have a website that shows the correct avatar (from Social Login) in comments but in likes it gets the user uploaded profile, even if the social login is forcing the new one (it get’s it directly from the upload folder).

    The wrong code is:

    $avatar   = bp_core_fetch_avatar(
        		array(
        			'html' => false,
        			'type'	  => 'thumb',
        			'item_id' => $user_id
        		)
        	);
    
        	// Get User Image Code.
            $output .= "<a data-yztooltip='" . $fullname . "' style='background-image: url( " . $avatar . ");' href='" . bp_core_get_user_domain ( $user_id ) . "'></a>";

    It returns:
    /wp-content/uploads/avatars/38/5f1df11236f8e-bpthumb.jpg (the old photo before social login)

    The code that shows the correct one:
    <?php bp_activity_avatar( ‘type=thumb&user_id=’ . bp_get_activity_comment_user_id() ); ?>

    It returns:
    //graph.facebook.com/2434567832184997/picture?type=large

    Tried changing but it shows the author profile pic on the liked space.

    Can anyone help me?

    Thanks!

  • You must be logged in to reply to this topic.
Skip to toolbar