Re: Function/Call to access Custom Profile Fields?
For some reason…no matter what I try, I can’t inject SPECIFIC variables via the xprofile_set_field_data function….I run this function (below)
ONLY AFTER running two conditionals to make sure
/////////
ONE the buddypress globals are set
and
TWO the check for the xprofile function passes
Both conditionals pass (as expected) then go to my test function below
////////
End result — The echo statement appears correctly…but nothing is appearing in the field values for the user – I am pulling my hair out??????
Sample
////////
function BP_Insert_Test($wpuid, $age) {
$age = ’22’; // Should appear in the profile
echo(‘user id is ‘ . $wpuid . ‘ and userdata is ‘ . $age);
xprofile_set_field_data(2, $wpuid, $age);
}
Any ideas?