amelioration(User.mailer.notify_inactive_close_to_deletion): ajoute le mail pour prevenir de la suppression de compte

This commit is contained in:
Martin 2023-11-03 10:39:41 +01:00 committed by mfo
parent ea9c571a30
commit 2f28012324
5 changed files with 52 additions and 3 deletions

View file

@ -67,7 +67,19 @@ class UserMailer < ApplicationMailer
mail(to: administrateur_or_instructeur.email, subject: subject)
end
def notify_inactive_close_to_deletion(user)
@user = user
@subject = "Votre compte sera supprimé dans #{ExpiredUsersDeletionService::RETENTION_AFTER_NOTICE_IN_WEEK} semaines"
mail(to: user.email, subject: @subject)
end
def self.critical_email?(action_name)
['france_connect_merge_confirmation', "new_account_warning", "ask_for_merge", "invite_instructeur"].include?(action_name)
[
'france_connect_merge_confirmation',
"new_account_warning",
"ask_for_merge",
"invite_instructeur"
].include?(action_name)
end
end