From abd454c45633e335d9d63bcd250e760b968f8138 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 20 Jan 2016 17:43:10 +0100 Subject: Update HTML 2FA template Split paragraph in translation Inject wallabag_url for image in HTML template Remove username & password from config_dev.yml (null are already the default value) --- src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php') diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php index fa682ae7..6b108dd3 100644 --- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php +++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php @@ -46,6 +46,13 @@ class AuthCodeMailer implements AuthCodeMailerInterface */ private $supportUrl; + /** + * Url for the wallabag instance. + * + * @var string + */ + private $wallabagUrl; + /** * Initialize the auth code mailer with the SwiftMailer object. * @@ -54,14 +61,16 @@ class AuthCodeMailer implements AuthCodeMailerInterface * @param string $senderEmail * @param string $senderName * @param string $supportUrl + * @param string $wallabagUrl */ - public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl) + public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl) { $this->mailer = $mailer; $this->twig = $twig; $this->senderEmail = $senderEmail; $this->senderName = $senderName; $this->supportUrl = $supportUrl; + $this->wallabagUrl = $wallabagUrl; } /** @@ -77,12 +86,13 @@ class AuthCodeMailer implements AuthCodeMailerInterface $bodyHtml = $template->renderBlock('body_html', [ 'user' => $user->getName(), 'code' => $user->getEmailAuthCode(), - 'support' => $this->supportUrl, + 'support_url' => $this->supportUrl, + 'wallabag_url' => $this->wallabagUrl, ]); $bodyText = $template->renderBlock('body_text', [ 'user' => $user->getName(), 'code' => $user->getEmailAuthCode(), - 'support' => $this->supportUrl, + 'support_url' => $this->supportUrl, ]); $message = new \Swift_Message(); -- cgit v1.2.3