X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/c367958b6f5eb5e1446f03e47b6177bf8831428e..0811e272814cf05d6fc8bc76646a0be99bf79bb9:/Controller/UserController.php diff --git a/Controller/UserController.php b/Controller/UserController.php index 5d7a85b..73f02ea 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -12,6 +12,9 @@ namespace Rapsys\UserBundle\Controller; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; + +use Rapsys\UserBundle\RapsysUserBundle; + use Symfony\Bridge\Twig\Mime\TemplatedEmail; use Symfony\Component\Form\FormError; use Symfony\Component\HttpFoundation\Request; @@ -22,8 +25,6 @@ use Symfony\Component\Mime\Address; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; -use Rapsys\UserBundle\RapsysUserBundle; - /** * {@inheritdoc} */ @@ -495,7 +496,7 @@ class UserController extends AbstractController { //Create message $message = (new TemplatedEmail()) //Set sender - ->from(new Address($this->config['contact']['address'], $this->config['contact']['name'])) + ->from(new Address($this->config['contact']['address'], $this->translator->trans($this->config['contact']['name']))) //Set recipient //XXX: remove the debug set in vendor/symfony/mime/Address.php +46 ->to(new Address($context['recipient_mail'], $context['recipient_name'])) @@ -688,7 +689,7 @@ class UserController extends AbstractController { //Create message $message = (new TemplatedEmail()) //Set sender - ->from(new Address($this->config['contact']['address'], $this->config['contact']['name'])) + ->from(new Address($this->config['contact']['address'], $this->translator->trans($this->config['contact']['name']))) //Set recipient //XXX: remove the debug set in vendor/symfony/mime/Address.php +46 ->to(new Address($context['recipient_mail'], $context['recipient_name']))