PHRAS-3256 take in account langage in mail

This commit is contained in:
aina esokia
2021-02-03 11:44:42 +03:00
parent 72017ed9a4
commit 215562ab74
45 changed files with 255 additions and 77 deletions

View File

@@ -187,6 +187,10 @@ class UserCreateCommand extends Command
$mail->setButtonUrl('http://'.$servername.'/login/renew-password/?token='.$token->getValue());
$mail->setLogin($user->getLogin());
if (($locale = $user->getLocale()) != null) {
$mail->setLocale($locale);
}
$this->deliver($mail);
}
@@ -205,6 +209,10 @@ class UserCreateCommand extends Command
$mail->setButtonUrl('http://'.$servername.'/login/register-confirm/?code='.$token->getValue());
$mail->setExpiration($token->getExpiration());
if (($locale = $user->getLocale()) != null) {
$mail->setLocale($locale);
}
$this->deliver($mail);
}