mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:22:36 +08:00
FIX: serialize current user fields in standard user serializer
This commit is contained in:
parent
d97b2382e6
commit
c82b33600a
|
@ -333,8 +333,13 @@ class UserSerializer < BasicUserSerializer
|
|||
def custom_fields
|
||||
fields = nil
|
||||
|
||||
if scope.can_edit?(object)
|
||||
fields = DiscoursePluginRegistry.serialized_current_user_fields.to_a
|
||||
end
|
||||
|
||||
if SiteSetting.public_user_custom_fields.present?
|
||||
fields = SiteSetting.public_user_custom_fields.split('|')
|
||||
fields ||= []
|
||||
fields += SiteSetting.public_user_custom_fields.split('|')
|
||||
end
|
||||
|
||||
if fields.present?
|
||||
|
|
Loading…
Reference in New Issue
Block a user