aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r--src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php10
-rw-r--r--src/Wallabag/UserBundle/Resources/config/services.yml3
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
index 6b108dd3..4ab6051b 100644
--- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
+++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
@@ -4,6 +4,7 @@ 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 Craue\ConfigBundle\Util\Config;
7 8
8/** 9/**
9 * Custom mailer for TwoFactorBundle email. 10 * Custom mailer for TwoFactorBundle email.
@@ -60,17 +61,16 @@ class AuthCodeMailer implements AuthCodeMailerInterface
60 * @param \Twig_Environment $twig 61 * @param \Twig_Environment $twig
61 * @param string $senderEmail 62 * @param string $senderEmail
62 * @param string $senderName 63 * @param string $senderName
63 * @param string $supportUrl 64 * @param Config $craueConfig Craue\Config instance to get wallabag support url from database
64 * @param string $wallabagUrl
65 */ 65 */
66 public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl) 66 public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, Config $craueConfig)
67 { 67 {
68 $this->mailer = $mailer; 68 $this->mailer = $mailer;
69 $this->twig = $twig; 69 $this->twig = $twig;
70 $this->senderEmail = $senderEmail; 70 $this->senderEmail = $senderEmail;
71 $this->senderName = $senderName; 71 $this->senderName = $senderName;
72 $this->supportUrl = $supportUrl; 72 $this->supportUrl = $craueConfig->get('wallabag_support_url');
73 $this->wallabagUrl = $wallabagUrl; 73 $this->wallabagUrl = $craueConfig->get('wallabag_url');
74 } 74 }
75 75
76 /** 76 /**
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml
index bf9e036a..d79d8fa2 100644
--- a/src/Wallabag/UserBundle/Resources/config/services.yml
+++ b/src/Wallabag/UserBundle/Resources/config/services.yml
@@ -6,8 +6,7 @@ services:
6 - "@twig" 6 - "@twig"
7 - "%scheb_two_factor.email.sender_email%" 7 - "%scheb_two_factor.email.sender_email%"
8 - "%scheb_two_factor.email.sender_name%" 8 - "%scheb_two_factor.email.sender_name%"
9 - "%wallabag_support_url%" 9 - "@craue_config"
10 - "%wallabag_url%"
11 10
12 wallabag_user.password_resetting: 11 wallabag_user.password_resetting:
13 class: Wallabag\UserBundle\EventListener\PasswordResettingListener 12 class: Wallabag\UserBundle\EventListener\PasswordResettingListener