mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: serialize current user fields in standard user serializer
This commit is contained in:
parent
d97b2382e6
commit
c82b33600a
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue