FIX: do not show full name on summary page unless the setting is enabled
This commit is contained in:
parent
098b6d9364
commit
08d21cc758
|
@ -21,6 +21,10 @@ class UserSummarySerializer < ApplicationSerializer
|
|||
class UserWithCountSerializer < ApplicationSerializer
|
||||
attributes :id, :username, :name, :count, :avatar_template
|
||||
|
||||
def include_name?
|
||||
SiteSetting.enable_names?
|
||||
end
|
||||
|
||||
def avatar_template
|
||||
User.avatar_template(object[:username], object[:uploaded_avatar_id])
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue