Browse Source

feat: move initial_confirmation_sent update

pull/1265/head
natdeanlewissoftwire 3 years ago
parent
commit
bf8c4e0aaf
  1. 1
      app/mailers/devise_notify_mailer.rb
  2. 1
      app/models/user.rb

1
app/mailers/devise_notify_mailer.rb

@ -41,7 +41,6 @@ class DeviseNotifyMailer < Devise::Mailer
send_confirmation_email(record.unconfirmed_email, record, token, username) send_confirmation_email(record.unconfirmed_email, record, token, username)
end end
send_confirmation_email(record.email, record, token, username) send_confirmation_email(record.email, record, token, username)
record.update!(initial_confirmation_sent: true)
end end
def intercept_send?(email) def intercept_send?(email)

1
app/models/user.rb

@ -124,6 +124,7 @@ class User < ApplicationRecord
return unless active? return unless active?
super super
update!(initial_confirmation_sent: true)
end end
def need_two_factor_authentication?(_request) def need_two_factor_authentication?(_request)

Loading…
Cancel
Save