diff options
Diffstat (limited to 'src/Wallabag/UserBundle')
3 files changed, 11 insertions, 10 deletions
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php index ca9d18f1..961208f2 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 | ||
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; | ||
8 | 7 | ||
9 | /** | 8 | /** |
10 | * Custom mailer for TwoFactorBundle email. | 9 | * Custom mailer for TwoFactorBundle email. |
@@ -61,16 +60,17 @@ class AuthCodeMailer implements AuthCodeMailerInterface | |||
61 | * @param \Twig_Environment $twig | 60 | * @param \Twig_Environment $twig |
62 | * @param string $senderEmail | 61 | * @param string $senderEmail |
63 | * @param string $senderName | 62 | * @param string $senderName |
64 | * @param Config $craueConfig Craue\Config instance to get wallabag support url from database | 63 | * @param string $supportUrl wallabag support url |
64 | * @param string $wallabagUrl wallabag instance url | ||
65 | */ | 65 | */ |
66 | public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, Config $craueConfig) | 66 | public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl) |
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 = $craueConfig->get('wallabag_support_url'); | 72 | $this->supportUrl = $supportUrl; |
73 | $this->wallabagUrl = $craueConfig->get('wallabag_url'); | 73 | $this->wallabagUrl = $wallabagUrl; |
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 8062e53f..164a25ec 100644 --- a/src/Wallabag/UserBundle/Resources/config/services.yml +++ b/src/Wallabag/UserBundle/Resources/config/services.yml | |||
@@ -6,7 +6,8 @@ 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 | - "@craue_config" | 9 | - '@=service(''craue_config'').get(''wallabag_support_url'')' |
10 | - '@=service(''craue_config'').get(''wallabag_url'')' | ||
10 | 11 | ||
11 | wallabag_user.password_resetting: | 12 | wallabag_user.password_resetting: |
12 | class: Wallabag\UserBundle\EventListener\PasswordResettingListener | 13 | class: Wallabag\UserBundle\EventListener\PasswordResettingListener |
diff --git a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml index 30ab5dd9..fbc95a05 100644 --- a/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml +++ b/src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml | |||
@@ -1,11 +1,11 @@ | |||
1 | # Two factor mail | 1 | # Two factor mail |
2 | auth_code: | 2 | auth_code: |
3 | on: 'sur' | 3 | on: "sur" |
4 | mailer: | 4 | mailer: |
5 | subject: "Code d'authentification wallabag" | 5 | subject: "Code d’authentification wallabag" |
6 | body: | 6 | body: |
7 | hello: "Bonjour %user%," | 7 | hello: "Bonjour %user%," |
8 | first_para: "Comme vous avez activé la double authentification sur votre compte wallabag et que vous venez de vous connecter depuis un nouvel appareil (ordinateur, téléphone, etc.), nous vous envoyons un code pour valider votre connexion." | 8 | first_para: "Comme vous avez activé la double authentification sur votre compte wallabag et que vous venez de vous connecter depuis un nouvel appareil (ordinateur, téléphone, etc.), nous vous envoyons un code pour valider votre connexion." |
9 | second_para: "Voici le code à renseigner :" | 9 | second_para: "Voici le code à renseigner :" |
10 | support: "Si vous avez un problème de connexion, n'hésitez pas à contacter le support :" | 10 | support: "Si vous avez un problème de connexion, n’hésitez pas à contacter le support :" |
11 | signature: "L'équipe wallabag" | 11 | signature: "L’équipe wallabag" |