bug fix
-
trac isn’t taking my credentials, though I can log in here, so I’ll post it here:
bp-xprofile.php needs to be modified to handle checklist/serialized data in the get_random_profile_data function. Specifically:
function xprofile_get_random_profile_data( $user_id, $exclude_fullname = true ) {
$field_data = BP_XProfile_ProfileData::get_random( $user_id, $exclude_fullname );
$field_data[0]->value = xprofile_format_profile_field( $field_data[0]->type, $field_data[0]->value );
if ( !$field_data[0]->value || $field_data[0]->value == ” )
return false;
return $field_data;
}
needs to be changed to
function xprofile_get_random_profile_data( $user_id, $exclude_fullname = true ) {
$field_data = BP_XProfile_ProfileData::get_random( $user_id, $exclude_fullname );
if($val = @unserialize($field_data[0]->value)) {
$val = implode(“,”, $val);
$field_data[0]->value = $val;
}
$field_data[0]->value = xprofile_format_profile_field( $field_data[0]->type, $field_data[0]->value );
if ( !$field_data[0]->value || $field_data[0]->value == ” )
return false;
return $field_data;
}
- The topic ‘bug fix’ is closed to new replies.