mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
human?
helper method on a user
This is cleaner than hard coding `id > 0` in ruby code.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user