FEATURE: anonymous_account_duration_minutes , cycle anon accounts after N minutes from last post

fixes it so anon users can not like stuff
This commit is contained in:
Sam
2015-04-08 12:29:43 +10:00
parent 6398cd855c
commit 4bfca12b11
7 changed files with 55 additions and 7 deletions

View File

@ -725,6 +725,12 @@ class User < ActiveRecord::Base
UserProfile.create(user_id: id)
end
def anonymous?
SiteSetting.allow_anonymous_posting &&
trust_level >= 1 &&
custom_fields["master_id"].to_i > 0
end
protected
def badge_grant