Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/controllers/idv/enter_password_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def confirm_current_password
end

def init_profile
idv_session.create_profile_from_applicant_with_password(
profile = idv_session.create_profile_from_applicant_with_password(
password,
is_enhanced_ipp: resolved_authn_context_result.enhanced_ipp?,
proofing_components: ProofingComponents.new(
Expand All @@ -137,12 +137,13 @@ def init_profile
user_session:,
).to_h,
)
if idv_session.verify_by_mail?

if profile.gpo_verification_pending?
current_user.send_email_to_all_addresses(:verify_by_mail_letter_requested)
log_letter_enqueued_analytics(resend: false)
end

if idv_session.profile.active?
if profile.active?
create_user_event(:account_verified)
UserAlerts::AlertUserAboutAccountVerified.call(
profile: idv_session.profile,
Expand Down
3 changes: 3 additions & 0 deletions app/services/idv/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def respond_to_missing?(method_sym, include_private)
VALID_SESSION_ATTRIBUTES.include?(attr_name_sym) || super
end

# @return [Profile]
def create_profile_from_applicant_with_password(
user_password, is_enhanced_ipp:, proofing_components:
)
Expand Down Expand Up @@ -141,6 +142,8 @@ def create_profile_from_applicant_with_password(
if profile.gpo_verification_pending?
create_gpo_entry(profile_maker.pii_attributes, profile)
end

profile
end

def opt_in_param
Expand Down