diff --git a/app/serializers/user_summary_serializer.rb b/app/serializers/user_summary_serializer.rb index cf09cde0641..c2c104ea38d 100644 --- a/app/serializers/user_summary_serializer.rb +++ b/app/serializers/user_summary_serializer.rb @@ -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