xml.tag! "user", :id => user.id,
:display_name => user.display_name,
- :account_created => user.creation_time.xmlschema do
+ :account_created => user.created_at.xmlschema do
xml.tag! "description", user.description if user.description
- if current_user && current_user == user
+ if current_user && current_user == user && can?(:details, User)
xml.tag! "contributor-terms", :agreed => user.terms_agreed.present?,
:pd => user.consider_pd
else
:active => user.blocks_created.active.size
end
end
- if current_user && current_user == user
- if user.home_lat && user.home_lon
+ if current_user && current_user == user && can?(:details, User)
+ if user.home_location?
xml.tag! "home", :lat => user.home_lat,
:lon => user.home_lon,
:zoom => user.home_zoom
:unread => user.new_messages.size
xml.tag! "sent", :count => user.sent_messages.size
end
+ xml.tag! "email", user.email if scope_enabled?(:read_email)
end
end