3 json.display_name user.display_name
4 json.account_created user.created_at.xmlschema
5 json.description user.description if user.description
7 if current_user && current_user == user && can?(:details, User)
8 json.contributor_terms do
9 json.agreed user.terms_agreed.present?
10 json.pd user.consider_pd
13 json.contributor_terms do
14 json.agreed user.terms_agreed.present?
19 json.href user_image_url(user) if user.avatar.attached? || user.image_use_gravatar
23 json.array! user.roles.map(&:role)
27 json.count user.changesets.size
31 json.count user.traces.size
36 json.count user.blocks.size
37 json.active user.blocks.active.size
42 json.count user.blocks_created.size
43 json.active user.blocks_created.active.size
48 if current_user && current_user == user && can?(:details, User)
49 if user.home_lat && user.home_lon
51 json.lat user.home_lat
52 json.lon user.home_lon
53 json.zoom user.home_zoom
57 json.languages user.languages if user.languages?
61 json.count user.messages.size
62 json.unread user.new_messages.size
65 json.count user.sent_messages.size
69 json.email user.email if scope_enabled?(:read_email)