Skip to content

Commit

Permalink
Move e-mail texts in language files
Browse files Browse the repository at this point in the history
  • Loading branch information
DidierViret committed Jun 14, 2024
1 parent 52b64ef commit 6999e7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions orif/user/Controllers/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ public function generate_send_verification_code($form_email) { // generate code
$appTitle = lang('common_lang.app_title');
$email->initialize($emailConfig);
//Sending code to user's orif
$email->setFrom('[email protected]', 'ORIF: Vérification du mail');
$email->setFrom(getenv('SMTP_ID'), lang('common_lang.app_title'));
// 2nd paramater hard coded since variable not interpreted in SetFrom$email->setTo($form_email);
$email->setSubject('Code de vérification');
$email->setMessage('Voici votre code de vérification: '.$verification_code);
$email->setSubject(lang('user_lang.mail_verification_code_subject'));
$email->setMessage(lang('user_lang.mail_verification_code_text').$verification_code);
$email->send(false);

// Set code's expiration timer
Expand Down
2 changes: 2 additions & 0 deletions orif/user/Language/fr/user_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,6 @@
'code_expiration_time' => 'Temps restant avant l\'expiration du code:',
'time_expired' => 'Temps expiré',
'resend_msg' => 'Vous n\'avez rien reçu ?',
'mail_verification_code_subject' => 'Code de vérification',
'mail_verification_code_text' => 'Voici votre code de vérification: ',
];

0 comments on commit 6999e7b

Please sign in to comment.