bp_get_member_profile_data() and xprofile_get_field_data() for current profile not logged in member

So fairy simple question I think. Currently I have a popup form on the profile page of members, and I want the dynamic details there to be the details of that member whose page the user is on, but instead right now I’m getting the logged in user’s member details.

Using function xprofile_get_field_data() and bp_get_member_profile_data()