diff --git a/app/models/event_log.rb b/app/models/event_log.rb index 42f0f4f8c..21c5afe21 100644 --- a/app/models/event_log.rb +++ b/app/models/event_log.rb @@ -1,7 +1,7 @@ require "ipaddr" class EventLog < ApplicationRecord - LOCKED_DURATION = "#{Devise.unlock_in / 1.hour} #{'hour'.pluralize(Devise.unlock_in / 1.hour)}".freeze + LOCKED_DURATION = User.unlock_in.inspect.freeze EVENTS = [ ACCOUNT_LOCKED = LogEntry.new(id: 1, description: "Password verification failed too many times, account locked for #{LOCKED_DURATION}", require_uid: true), diff --git a/app/views/devise/two_step_verification_session/max_2sv_login_attempts_reached.html.erb b/app/views/devise/two_step_verification_session/max_2sv_login_attempts_reached.html.erb index 5b870f8db..e35385c69 100644 --- a/app/views/devise/two_step_verification_session/max_2sv_login_attempts_reached.html.erb +++ b/app/views/devise/two_step_verification_session/max_2sv_login_attempts_reached.html.erb @@ -9,7 +9,7 @@
Your account has been locked because an incorrect 2-step verification code was entered too many times.
-Your account will be unlocked at <%= Devise.unlock_in.from_now.to_fs(:govuk_time)%>
+Your account will be unlocked at <%= User.unlock_in.from_now.to_fs(:govuk_time)%>
If you need your account unlocked sooner, please contact a managing <%= t('department.name') %> editor in your organisation (or your parent organisation). They can use the support form to get help from the <%= t('department.name') %> team.