aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Mailer
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-01-10 13:01:00 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-21 11:03:27 +0100
commitd1f1333f481a6814bb310c934b798d9f594f0b04 (patch)
treefdebbe0b70cbcd587071a19331d7d545be5f1b30 /src/Wallabag/UserBundle/Mailer
parent7ce895bf5e0531b96b2cf0692b9da3814fb742f8 (diff)
downloadwallabag-d1f1333f481a6814bb310c934b798d9f594f0b04.tar.gz
wallabag-d1f1333f481a6814bb310c934b798d9f594f0b04.tar.zst
wallabag-d1f1333f481a6814bb310c934b798d9f594f0b04.zip
CS
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(),