discourse/app/serializers/group_user_serializer.rb
Martin Brennan afb5533581
FEATURE: Add timezone to core user_options (#8380)
* Add timezone to user_options table

* Also migrate existing timezone values from UserCustomField,
  which is where the discourse-calendar plugin is storing them

* Allow user to change their core timezone from Profile

* Auto guess & set timezone on login & invite accept & signup

* Serialize user_options.timezone for group members. this is so discourse-group-timezones can access the core user timezone, as it is being removed in discourse-calendar.

* Annotate user_option with timezone

* Validate timezone values
2019-11-25 10:49:27 +10:00

18 lines
326 B
Ruby

# frozen_string_literal: true
class GroupUserSerializer < BasicUserSerializer
include UserPrimaryGroupMixin
attributes :name,
:title,
:last_posted_at,
:last_seen_at,
:added_at,
:timezone
def include_added_at
object.respond_to? :added_at
end
end