diff options
-rw-r--r-- | app/models/user.rb | 7 | ||||
-rw-r--r-- | config/initializers/8_devise.rb | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index ac83c8e3256..4adc44a9375 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1505,6 +1505,13 @@ class User < ApplicationRecord super end + # override from Devise::Confirmable + def confirmation_period_valid? + return false if Feature.disabled?(:soft_email_confirmation) + + super + end + private def default_private_profile_to_false diff --git a/config/initializers/8_devise.rb b/config/initializers/8_devise.rb index 3dd12c7e64d..8ef9ff6b7fc 100644 --- a/config/initializers/8_devise.rb +++ b/config/initializers/8_devise.rb @@ -81,7 +81,7 @@ Devise.setup do |config| # You can use this to let your user access some features of your application # without confirming the account, but blocking it after a certain period # (ie 2 days). - # config.allow_unconfirmed_access_for = 2.days + config.allow_unconfirmed_access_for = 30.days # Defines which key will be used when confirming an account # config.confirmation_keys = [ :email ] |