FIX: honor email_token_grace_period_hours setting correctly

The documentation said that the unit for this setting is in *hours*, but the
code is treating it as *seconds*. Also, `Numeric#ago` has been deprecated since
Rails 4.1 (precisely to help prevent these kind of bugs) and will go away in
Rails 4.2.
This commit is contained in:
Godfrey Chan 2014-10-10 18:49:37 -07:00
parent 2dd2b70994
commit 7ddf1df3e0

View File

@ -22,7 +22,7 @@ class EmailToken < ActiveRecord::Base
end
def self.confirm_valid_after
SiteSetting.email_token_grace_period_hours.ago
SiteSetting.email_token_grace_period_hours.hours.ago
end
def self.unconfirmed