Merge pull request #10595 from demarches-simplifiees/email-mandant-need-confirmation-ldu
ETQ Mandant, je dois confirmer mon mail avant de recevoir des notifs
This commit is contained in:
commit
7630cc39fa
9 changed files with 153 additions and 8 deletions
|
@ -147,10 +147,14 @@ module Users
|
|||
def update_identite
|
||||
@dossier = dossier
|
||||
@no_description = true
|
||||
email = dossier_params.dig('individual_attributes', 'email')
|
||||
|
||||
if @dossier.update(dossier_params) && @dossier.individual.valid?
|
||||
# TODO: remove this after proper mandat email validation
|
||||
@dossier.individual.update!(email_verified_at: Time.zone.now)
|
||||
# verify for_tiers email
|
||||
if email.present?
|
||||
User.create_or_promote_to_tiers(email, SecureRandom.hex, @dossier)
|
||||
end
|
||||
|
||||
@dossier.update!(autorisation_donnees: true, identity_updated_at: Time.zone.now)
|
||||
flash.notice = t('.identity_saved')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue