Browse Source

CLDC-4044: Reset last_sign_at fields on reactivation

this is to ensure that the code considers them a fresh user

specifically, ensures that the "Resend invite link" button will show
CLDC-4044-reset-last-login-date-on-deactivation-flow
Samuel Young 6 days ago
parent
commit
05b6dbec1e
  1. 5
      app/models/user.rb

5
app/models/user.rb

@ -167,6 +167,11 @@ class User < ApplicationRecord
update!( update!(
active: true, active: true,
reactivate_with_organisation: false, reactivate_with_organisation: false,
# resetting these fields ensures that the 'resend confirmation instructions' button shows
# we have this button be based on sign in date than confirmation status to ensure that the
# user has successfully completed the entire login flow before we hide the button
last_sign_in_at: nil,
last_sign_in_ip: nil,
) )
end end

Loading…
Cancel
Save