human? helper method on a user

This is cleaner than hard coding `id > 0` in ruby code.
This commit is contained in:
Robin Ward
2019-02-08 13:34:54 -05:00
parent fb18c57372
commit c719658f9f
5 changed files with 17 additions and 3 deletions

View File

@@ -291,6 +291,10 @@ class User < ActiveRecord::Base
fields.uniq
end
def human?
self.id > 0
end
def effective_locale
if SiteSetting.allow_user_locale && self.locale.present?
self.locale