diff options
Diffstat (limited to 'src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php')
-rw-r--r-- | src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php index 6b108dd3..98017f43 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 | ||
5 | use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; | 5 | use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; |
6 | use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface; | 6 | use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface; |
7 | use Craue\ConfigBundle\Util\Config; | ||
7 | 8 | ||
8 | /** | 9 | /** |
9 | * Custom mailer for TwoFactorBundle email. | 10 | * Custom mailer for TwoFactorBundle email. |
@@ -47,7 +48,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface | |||
47 | private $supportUrl; | 48 | private $supportUrl; |
48 | 49 | ||
49 | /** | 50 | /** |
50 | * Url for the wallabag instance. | 51 | * Url for the wallabag instance (only used for image in the HTML email template) |
51 | * | 52 | * |
52 | * @var string | 53 | * @var string |
53 | */ | 54 | */ |
@@ -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 | /** |