aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 847959ce7..7f85a2c4f 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -326,6 +326,17 @@ class User < ActiveRecord::Base
return text
end
+ def json_for_api
+ return {
+ :id => self.id,
+ :url_name => self.url_name,
+ :name => self.name,
+ :ban_text => self.ban_text,
+ :about_me => self.about_me,
+ # :profile_photo => self.profile_photo # ought to have this, but too hard to get URL out for now
+ # created_at / updated_at we only show the year on the main page for privacy reasons, so don't put here
+ }
+ end
private