aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Mailer
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/UserBundle/Mailer')
-rw-r--r--src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
index c04720ae..fa682ae7 100644
--- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
+++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
@@ -4,7 +4,6 @@ namespace Wallabag\UserBundle\Mailer;
4 4
5use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; 5use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
6use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface; 6use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface;
7use Symfony\Component\Translation\TranslatorInterface;
8 7
9/** 8/**
10 * Custom mailer for TwoFactorBundle email. 9 * Custom mailer for TwoFactorBundle email.
@@ -50,11 +49,11 @@ class AuthCodeMailer implements AuthCodeMailerInterface
50 /** 49 /**
51 * Initialize the auth code mailer with the SwiftMailer object. 50 * Initialize the auth code mailer with the SwiftMailer object.
52 * 51 *
53 * @param \Swift_Mailer $mailer 52 * @param \Swift_Mailer $mailer
54 * @param \Twig_Environment $twig 53 * @param \Twig_Environment $twig
55 * @param string $senderEmail 54 * @param string $senderEmail
56 * @param string $senderName 55 * @param string $senderName
57 * @param string $supportUrl 56 * @param string $supportUrl
58 */ 57 */
59 public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl) 58 public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl)
60 { 59 {
@@ -74,7 +73,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface
74 { 73 {
75 $template = $this->twig->loadTemplate('@WallabagUserBundle/Resources/views/TwoFactor/email_auth_code.html.twig'); 74 $template = $this->twig->loadTemplate('@WallabagUserBundle/Resources/views/TwoFactor/email_auth_code.html.twig');
76 75
77 $subject = $template->renderBlock('subject', array()); 76 $subject = $template->renderBlock('subject', array());
78 $bodyHtml = $template->renderBlock('body_html', [ 77 $bodyHtml = $template->renderBlock('body_html', [
79 'user' => $user->getName(), 78 'user' => $user->getName(),
80 'code' => $user->getEmailAuthCode(), 79 'code' => $user->getEmailAuthCode(),