X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FWallabag%2FUserBundle%2FMailer%2FAuthCodeMailer.php;h=6b108dd3ef2a7605720b3cab8c451e45557c8f88;hb=refs%2Fpull%2F1565%2Fhead;hp=fa682ae75025d6ee18fafbf379fab5cf79e01db1;hpb=5f736213af209b0457e4e9d62f06fd5f46652f5f;p=github%2Fwallabag%2Fwallabag.git 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();