mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05: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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue