Index: branches/5.2.x/core/units/user_profile/user_profile_tp.php =================================================================== --- branches/5.2.x/core/units/user_profile/user_profile_tp.php +++ branches/5.2.x/core/units/user_profile/user_profile_tp.php @@ -39,24 +39,26 @@ } if ( $user_field ) { - // Determine if field should be shown on "Public Profile" page. + // Determine if field should be shown on "Public Profile" page (always checkbox). $block_params = array('name' => 'DisplayToPublic', 'value' => $user_field); $selected = $this->Application->ProcessParsedTag( $this->getUserPrefixSpecial(), 'Selected', $block_params ); + $value = $selected ? 1 : 0; } else { - // New user-defined public profile field - fallback to persistent session storage. - $selected = $this->recallUserProfileVar($field) == 1; + // Custom user preference (can by field of any type) - fallback to persistent session storage. + $value = $this->recallUserProfileVar($field); + $selected = $value == 1; } if ( isset($params['checked']) && $params['checked'] ) { return $selected ? 'checked' : ''; } - return $selected ? 1 : 0; + return $value; } /**