mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user