From b8d39a11e61eda0f551cbed5eab9be0b4d48decc Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Wed, 27 Nov 2019 11:47:00 +0100
Subject: [PATCH] FEAT #12481 TIME 0:30 clickable url in password modification
 email

---
 src/app/user/controllers/UserController.php |  4 ++--
 src/core/lang/lang-en.php                   | 11 ++++++-----
 src/core/lang/lang-fr.php                   | 11 ++++++-----
 src/core/lang/lang-nl.php                   | 11 ++++++-----
 4 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/src/app/user/controllers/UserController.php b/src/app/user/controllers/UserController.php
index dec25d78eae..06b0be098a8 100755
--- a/src/app/user/controllers/UserController.php
+++ b/src/app/user/controllers/UserController.php
@@ -202,7 +202,7 @@ class UserController
                     'sender'        => ['email' => 'Notification'],
                     'recipients'    => [$newUser['mail']],
                     'object'        => _NOTIFICATIONS_USER_CREATION_SUBJECT,
-                    'body'          => _NOTIFICATIONS_USER_CREATION_BODY . $url . _NOTIFICATIONS_USER_CREATION_FOOTER,
+                    'body'          => _NOTIFICATIONS_USER_CREATION_BODY . '<a href="' . $url . '">'._CLICK_HERE.'</a>' . _NOTIFICATIONS_USER_CREATION_FOOTER,
                     'isHtml'        => true,
                     'status'        => 'WAITING'
                 ]
@@ -1542,7 +1542,7 @@ class UserController
                 'sender'        => ['email' => 'Notification'],
                 'recipients'    => [$user['mail']],
                 'object'        => _NOTIFICATIONS_FORGOT_PASSWORD_SUBJECT,
-                'body'          => _NOTIFICATIONS_FORGOT_PASSWORD_BODY . $url . _NOTIFICATIONS_FORGOT_PASSWORD_FOOTER,
+                'body'          => _NOTIFICATIONS_FORGOT_PASSWORD_BODY . '<a href="' . $url . '">'._CLICK_HERE.'</a>' . _NOTIFICATIONS_FORGOT_PASSWORD_FOOTER,
                 'isHtml'        => true,
                 'status'        => 'WAITING'
             ]
diff --git a/src/core/lang/lang-en.php b/src/core/lang/lang-en.php
index 669d4fc67ce..1e689a8ce43 100755
--- a/src/core/lang/lang-en.php
+++ b/src/core/lang/lang-en.php
@@ -414,11 +414,12 @@ define("_INDEXINGMODEL_SUPPRESSION", "Indexing model suppression");
 define("_PRIORITY_DELAY_ALREADY_SET", "This time limit is already set to another priority");
 
 define("_NOTIFICATIONS_FORGOT_PASSWORD_SUBJECT", "[Maarch Courrier] Reset password informations");
-define("_NOTIFICATIONS_FORGOT_PASSWORD_BODY", "Hello,<br/>You requested to reset the password for your Maarch Courrier account.<br/>To change your password, please click on the link below :<br/>");
-define("_NOTIFICATIONS_FORGOT_PASSWORD_FOOTER", "<br/><br/>If you did not perform this request, you can safely ignore this email.<br/>Please contact your administrator if you have any questions.");
+define("_NOTIFICATIONS_FORGOT_PASSWORD_BODY", "Hello,<br/><br/>You requested to reset the password for your Maarch Courrier account.<br/><br/>To change your password, please click on the link below :<br/>");
+define("_NOTIFICATIONS_FORGOT_PASSWORD_FOOTER", "<br/><br/>If you did not perform this request, you can safely ignore this email.<br/><br/>Please contact your administrator if you have any questions.");
 define("_PASSWORD_REINIT_SENT", "Password reset sent");
 define("_PASSWORD_REINIT", "Password rest");
 
-define("_NOTIFICATIONS_USER_CREATION_SUBJECT", "[Maarch Courrier] Account creation");
-define("_NOTIFICATIONS_USER_CREATION_BODY", "Hello,<br/>an administrator created your account in Maarch Courrier software.<br/>To log in and set your password, please click on the link below :<br/>");
-define("_NOTIFICATIONS_USER_CREATION_FOOTER", "<br/>For any questions, please contact your software administrator");
+define("_NOTIFICATIONS_USER_CREATION_SUBJECT", "[Maarch Courrier] Activate your user account");
+define("_NOTIFICATIONS_USER_CREATION_BODY", "Welcome,<br/><br/>You have now an account to Maarch Courrier.<br/><br/>To log in and set your password, please click on the link below :<br/><br/>");
+define("_NOTIFICATIONS_USER_CREATION_FOOTER", "<br/><br/>This message is sent automatically as a result of an administrator action.<br/>Please do not answer.<br/><br/>For any questions, please contact your software administrator");
+define("_CLICK_HERE", "Click-here");
diff --git a/src/core/lang/lang-fr.php b/src/core/lang/lang-fr.php
index 846670400d0..891930b34df 100755
--- a/src/core/lang/lang-fr.php
+++ b/src/core/lang/lang-fr.php
@@ -413,11 +413,12 @@ define("_INDEXINGMODEL_SUPPRESSION", "Modèle d'enregistrement supprimé");
 define("_PRIORITY_DELAY_ALREADY_SET", "Ce délai de traitement est déjà défini pour une autre priorité");
 
 define("_NOTIFICATIONS_FORGOT_PASSWORD_SUBJECT", "[Maarch Courrier] Demande de réinitialisation de mot de passe");
-define("_NOTIFICATIONS_FORGOT_PASSWORD_BODY", "Bonjour,<br/>Vous avez demandé à retrouver le mot de passe d'accès à votre compte Maarch Courrier.<br/>Pour modifier votre mot de passe, merci de bien vouloir cliquer sur le lien ci-dessous :<br/><br/>");
-define("_NOTIFICATIONS_FORGOT_PASSWORD_FOOTER", "<br/><br/>Si vous n'êtes pas à l'origine de cette demande, merci d'ignorer ce courriel.<br/>Pour toutes questions, merci de contacter l'administrateur technique de la solution.");
+define("_NOTIFICATIONS_FORGOT_PASSWORD_BODY", "Bonjour,<br/><br/>Vous avez demandé à retrouver le mot de passe d'accès à votre compte Maarch Courrier.<br/><br/>Pour modifier votre mot de passe, merci de bien vouloir cliquer sur le lien ci-dessous :<br/><br/>");
+define("_NOTIFICATIONS_FORGOT_PASSWORD_FOOTER", "<br/><br/>Si vous n'êtes pas à l'origine de cette demande, merci d'ignorer ce courriel.<br/><br/>Pour toutes questions, merci de contacter l'administrateur de la solution.");
 define("_PASSWORD_REINIT_SENT", "Réinitialisation du mot de passe envoyé");
 define("_PASSWORD_REINIT", "Mot de passe réinitialisé");
 
-define("_NOTIFICATIONS_USER_CREATION_SUBJECT", "[Maarch Courrier] Création de votre compte");
-define("_NOTIFICATIONS_USER_CREATION_BODY", "Bonjour,<br/>Un administrateur a créé votre compte dans l'application Maarch Courrier.<br/>Pour vous connecter et définir votre mot de passe, merci de bien vouloir cliquer sur le lien ci-dessous :<br/><br/>");
-define("_NOTIFICATIONS_USER_CREATION_FOOTER", "<br/><br/>Ce message est envoyé automatiquement. Merci de ne pas y répondre.<br/>Pour toutes questions, merci de contacter l'administrateur technique de la solution.");
+define("_NOTIFICATIONS_USER_CREATION_SUBJECT", "[Maarch Courrier] Activer votre compte utilisateur");
+define("_NOTIFICATIONS_USER_CREATION_BODY", "Bienvenue,<br/><br/>Vous disposez maintenant d'un compte dans l'application de gestion électronique de courrier Maarch Courrier.<br/><br/>Pour vous connecter et définir votre mot de passe, merci de bien vouloir cliquer sur le lien ci-dessous :<br/><br/>");
+define("_CLICK_HERE", "Cliquez-ici pour définir votre mot de passe");
+define("_NOTIFICATIONS_USER_CREATION_FOOTER", "<br/><br/>Ce message est envoyé automatiquement à la suite d'une action de l'administrateur.<br/>Merci de ne pas y répondre.<br/><br/>Pour toutes questions, merci de contacter l'administrateur technique de la solution.");
diff --git a/src/core/lang/lang-nl.php b/src/core/lang/lang-nl.php
index b5daf940a85..06b85daca67 100755
--- a/src/core/lang/lang-nl.php
+++ b/src/core/lang/lang-nl.php
@@ -419,11 +419,12 @@ define("_INDEXINGMODEL_SUPPRESSION", "Indexing model suppression_TO_TRANSLATE");
 define("_PRIORITY_DELAY_ALREADY_SET", "Ce délai de traitement est déjà paramétré pour une autre priorité_TO_TRANSLATE");
 
 define("_NOTIFICATIONS_FORGOT_PASSWORD_SUBJECT", "[Maarch Courrier] Reset password informations_TO_TRANSLATE");
-define("_NOTIFICATIONS_FORGOT_PASSWORD_BODY", "Hello,<br/>You requested to reset the password for your Maarch Courrier account.<br/>To change your password, please click on the link below :<br/>_TO_TRANSLATE");
-define("_NOTIFICATIONS_FORGOT_PASSWORD_FOOTER", "<br/><br/>If you did not perform this request, you can safely ignore this email.<br/>Please contact your administrator if you have any questions._TO_TRANSLATE");
+define("_NOTIFICATIONS_FORGOT_PASSWORD_BODY", "Hello,<br/><br/>You requested to reset the password for your Maarch Courrier account.<br/><br/>To change your password, please click on the link below :<br/>_TO_TRANSLATE");
+define("_NOTIFICATIONS_FORGOT_PASSWORD_FOOTER", "<br/><br/>If you did not perform this request, you can safely ignore this email.<br/><br/>Please contact your administrator if you have any questions._TO_TRANSLATE");
 define("_PASSWORD_REINIT_SENT", "Password reset sent_TO_TRANSLATE");
 define("_PASSWORD_REINIT", "Password rest_TO_TRANSLATE");
 
-define("_NOTIFICATIONS_USER_CREATION_SUBJECT", "[Maarch Courrier] Account creation_TO_TRANSLATE");
-define("_NOTIFICATIONS_USER_CREATION_BODY", "Hello,<br/>an administrator created your account in Maarch Courrier software.<br/>To log in and set your password, please click on the link below :<br/>_TO_TRANSLATE");
-define("_NOTIFICATIONS_USER_CREATION_FOOTER", "<br/>For any questions, please contact your software administrator_TO_TRANSLATE");
+define("_NOTIFICATIONS_USER_CREATION_SUBJECT", "[Maarch Courrier] Activate your user account_TO_TRANSLATE");
+define("_NOTIFICATIONS_USER_CREATION_BODY", "Welcome,<br/><br/>You have now an account to Maarch Courrier.<br/><br/>To log in and set your password, please click on the link below :<br/><br/>_TO_TRANSLATE");
+define("_NOTIFICATIONS_USER_CREATION_FOOTER", "<br/><br/>This message is sent automatically as a result of an administrator action.<br/>Please do not answer.<br/><br/>For any questions, please contact your software administrator_TO_TRANSLATE");
+define("_CLICK_HERE", "Click-here_TO_TRANSLATE");
-- 
GitLab