aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-11-03 16:41:29 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-11-03 16:41:29 +0100
commit5a619812ca3eb05a82a023ccdaee13501eb8d45f (patch)
treea1541999a3e13f9bb8b45d3a61320ee61aa4eb3c /src/Wallabag/UserBundle
parentda4136557963018287cae61226e9006c3c741747 (diff)
parent84795d015b3c7e1af48a3dda3cb33cf080b66e8f (diff)
downloadwallabag-5a619812ca3eb05a82a023ccdaee13501eb8d45f.tar.gz
wallabag-5a619812ca3eb05a82a023ccdaee13501eb8d45f.tar.zst
wallabag-5a619812ca3eb05a82a023ccdaee13501eb8d45f.zip
Merge remote-tracking branch 'origin/master' into 2.2
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
-rw-r--r--src/Wallabag/UserBundle/Resources/translations/wallabag_user.fr.yml8
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
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;
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
2auth_code: 2auth_code:
3 on: 'sur' 3 on: "sur"
4 mailer: 4 mailer:
5 subject: "Code d'authentification wallabag" 5 subject: "Code dauthentification 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, nhésitez pas à contacter le support :"
11 signature: "L'équipe wallabag" 11 signature: "Léquipe wallabag"