mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 10:41:45 +08:00
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:
parent
2dd2b70994
commit
7ddf1df3e0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user