'Return a dictionary whose keys are the names of the fields in this
model that are privacy-controlled, and whose values are the default
values to use for those fields when the user is not privileged to
view their actual value.
Note: should be only used through UserProfile class. We should
fix this.'

@classmethod
def privacy_fields(cls):

    if (cls.CACHED_PRIVACY_FIELDS is None):
        privacy_fields = {}
        field_names = cls._meta.get_all_field_names()
        for name in field_names:
            if (name.startswith('privacy_') or (not (('privacy_%s' % name) in field_names))):
                continue
            field = cls._meta.get_field(name)
            if isinstance(field, ManyToManyField):
                default = field.related.model.objects.none()
            else:
                default = field.get_default()
            privacy_fields[name] = default
        privacy_fields['email'] = u''
        cls.CACHED_PRIVACY_FIELDS = privacy_fields
    return cls.CACHED_PRIVACY_FIELDS
