Browse Source

Send beta onboarding template if migrated from Softwire

pull/580/head
baarkerlounger 3 years ago
parent
commit
11b2d46089
  1. 9
      app/models/user.rb

9
app/models/user.rb

@ -67,14 +67,23 @@ class User < ApplicationRecord
MFA_TEMPLATE_ID = "6bdf5ee1-8e01-4be1-b1f9-747061d8a24c".freeze
RESET_PASSWORD_TEMPLATE_ID = "2c410c19-80a7-481c-a531-2bcb3264f8e6".freeze
CONFIRMABLE_TEMPLATE_ID = "257460a6-6616-4640-a3f9-17c3d73d9e91".freeze
BETA_ONBOARDING_TEMPLATE_ID = "b48bc2cd-5887-4611-8296-d0ab3ed0e7fd".freeze
def reset_password_notify_template
RESET_PASSWORD_TEMPLATE_ID
end
def confirmable_template
if was_migrated_from_softwire?
BETA_ONBOARDING_TEMPLATE_ID
else
CONFIRMABLE_TEMPLATE_ID
end
end
def was_migrated_from_softwire?
old_user_id.present?
end
def skip_confirmation!
!user.active?

Loading…
Cancel
Save