From 7f84fd2b4c8d62c22d57ee963e61e7ca0ce68abf Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 12 Dec 2018 11:39:38 +0200 Subject: [PATCH] password change request fix --- .../Resources/templates/passwordChangeLink/cs_CZ/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/da_DK/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/de_DE/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/en_US/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/es_ES/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/es_MX/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/fr_FR/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/hr_HR/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/hu_HU/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/id_ID/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/it_IT/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/nb_NO/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/nl_NL/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/pl_PL/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/pt_BR/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/ro_RO/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/ru_RU/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/sk_SK/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/sr_RS/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/tr_TR/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/uk_UA/body.tpl | 2 +- .../Resources/templates/passwordChangeLink/zh_CN/body.tpl | 2 +- application/Espo/Services/User.php | 7 ++++--- 23 files changed, 26 insertions(+), 25 deletions(-) diff --git a/application/Espo/Resources/templates/passwordChangeLink/cs_CZ/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/cs_CZ/body.tpl index 19866a1d4e..e4115369bc 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/cs_CZ/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/cs_CZ/body.tpl @@ -1 +1 @@ -"Můžete změnit Vaše heslo pomocí tohoto odkazu {{link}}, tato url adresa z bezpečnostních důvodů brzy vyprší. \ No newline at end of file +"Můžete změnit Vaše heslo pomocí tohoto odkazu {{link}}, tato url adresa z bezpečnostních důvodů brzy vyprší. \ No newline at end of file diff --git a/application/Espo/Resources/templates/passwordChangeLink/da_DK/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/da_DK/body.tpl index 0719903060..28d191cdd4 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/da_DK/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/da_DK/body.tpl @@ -1 +1 @@ -

You can change your password by following this link {{link}}. This unique URL will be expired soon.

+

You can change your password by following this link {{link}}. This unique URL will be expired soon.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/de_DE/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/de_DE/body.tpl index 6435230d96..48a227f1ca 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/de_DE/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/de_DE/body.tpl @@ -1 +1 @@ -

"Sie können Ihr Passwort über diesen Link {{link}} ändern. Diese eindeutige URL ist nur für kurze Zeit gültig.

+

"Sie können Ihr Passwort über diesen Link {{link}} ändern. Diese eindeutige URL ist nur für kurze Zeit gültig.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/en_US/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/en_US/body.tpl index cffa9d4096..0933baf139 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/en_US/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/en_US/body.tpl @@ -1 +1 @@ -

You can change your password by following this link {{link}}. This unique URL will be expired soon.

\ No newline at end of file +

You can change your password by following this link {{link}}. This unique URL will be expired soon.

\ No newline at end of file diff --git a/application/Espo/Resources/templates/passwordChangeLink/es_ES/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/es_ES/body.tpl index c4ec045f41..7374d9b7e5 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/es_ES/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/es_ES/body.tpl @@ -1 +1 @@ -

Puede cambiar su contraseña siguiendo este enlace {{link}}. Esta URL única expirará pronto.

+

Puede cambiar su contraseña siguiendo este enlace {{link}}. Esta URL única expirará pronto.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/es_MX/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/es_MX/body.tpl index 8729db507f..a14088c971 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/es_MX/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/es_MX/body.tpl @@ -1 +1 @@ -

Puede cambiar su contraseña siguiendo esta liga {{link}}. Esta dirección URL única expirará pronto.

+

Puede cambiar su contraseña siguiendo esta liga {{link}}. Esta dirección URL única expirará pronto.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/fr_FR/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/fr_FR/body.tpl index 0719903060..28d191cdd4 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/fr_FR/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/fr_FR/body.tpl @@ -1 +1 @@ -

You can change your password by following this link {{link}}. This unique URL will be expired soon.

+

You can change your password by following this link {{link}}. This unique URL will be expired soon.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/hr_HR/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/hr_HR/body.tpl index 1c00fdf1c6..500126cf42 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/hr_HR/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/hr_HR/body.tpl @@ -1 +1 @@ -

Možete promijeniti lozinku prateći ovaj link {{link}}. Ovaj jedinstveni URL traje samo kratko vrijeme.

+

Možete promijeniti lozinku prateći ovaj link {{link}}. Ovaj jedinstveni URL traje samo kratko vrijeme.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/hu_HU/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/hu_HU/body.tpl index e3b1a39c6f..c359ad135a 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/hu_HU/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/hu_HU/body.tpl @@ -1 +1 @@ -

A {{link}} következő linket megváltoztathatja. Ez az egyedi URL hamarosan lejár.

+

A {{link}} következő linket megváltoztathatja. Ez az egyedi URL hamarosan lejár.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/id_ID/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/id_ID/body.tpl index d1dfd93dd7..e9ac22bc9e 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/id_ID/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/id_ID/body.tpl @@ -1 +1 @@ -

Anda dapat mengubah password Anda dengan tautan ini {{link}}. url yang unik ini akan segera expired.

+

Anda dapat mengubah password Anda dengan tautan ini {{link}}. url yang unik ini akan segera expired.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/it_IT/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/it_IT/body.tpl index 3da81c5b58..b72bf44785 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/it_IT/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/it_IT/body.tpl @@ -1 +1 @@ -

Puoi modificare la password seguendo questo link {{link}}. Questo URL univoco scadrà a breve.

+

Puoi modificare la password seguendo questo link {{link}}. Questo URL univoco scadrà a breve.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/nb_NO/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/nb_NO/body.tpl index 0719903060..28d191cdd4 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/nb_NO/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/nb_NO/body.tpl @@ -1 +1 @@ -

You can change your password by following this link {{link}}. This unique URL will be expired soon.

+

You can change your password by following this link {{link}}. This unique URL will be expired soon.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/nl_NL/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/nl_NL/body.tpl index 87c685b2be..ac350e2c6e 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/nl_NL/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/nl_NL/body.tpl @@ -1 +1 @@ -

U kunt het wachtwoord veranderen via deze link {{link}}. Deze unieke link (url) wordt spoedig weer opgeheven.

+

U kunt het wachtwoord veranderen via deze link {{link}}. Deze unieke link (url) wordt spoedig weer opgeheven.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/pl_PL/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/pl_PL/body.tpl index 11610a3b48..5c52db729d 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/pl_PL/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/pl_PL/body.tpl @@ -1 +1 @@ -

Możesz zmienić hasło klikając w link {{link}}. Ten URL jest unikalny i wkrótce będzie nieważny.

+

Możesz zmienić hasło klikając w link {{link}}. Ten URL jest unikalny i wkrótce będzie nieważny.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/pt_BR/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/pt_BR/body.tpl index 239aaeba7d..c2f2c6b15d 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/pt_BR/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/pt_BR/body.tpl @@ -1 +1 @@ -

Você pode atualizar sua senha usando este link {{link}}. Esta URL é única e expirará em breve.

+

Você pode atualizar sua senha usando este link {{link}}. Esta URL é única e expirará em breve.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/ro_RO/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/ro_RO/body.tpl index de8fa764bc..e2ad09c944 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/ro_RO/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/ro_RO/body.tpl @@ -1 +1 @@ -

Vă puteți schimba parola urmând acest link {{link}}. Această adresă URL unică va expira în curând.

+

Vă puteți schimba parola urmând acest link {{link}}. Această adresă URL unică va expira în curând.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/ru_RU/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/ru_RU/body.tpl index 0719903060..28d191cdd4 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/ru_RU/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/ru_RU/body.tpl @@ -1 +1 @@ -

You can change your password by following this link {{link}}. This unique URL will be expired soon.

+

You can change your password by following this link {{link}}. This unique URL will be expired soon.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/sk_SK/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/sk_SK/body.tpl index e94a74f300..ce591f66cd 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/sk_SK/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/sk_SK/body.tpl @@ -1 +1 @@ -

Svoje heslo môžete zmeniť použitím tohoto odkazu {{link}}. Táto jedinečná URL čoskoro expiruje.

+

Svoje heslo môžete zmeniť použitím tohoto odkazu {{link}}. Táto jedinečná URL čoskoro expiruje.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/sr_RS/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/sr_RS/body.tpl index a8cb5326dd..9a78052f60 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/sr_RS/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/sr_RS/body.tpl @@ -1 +1 @@ -

Možete da promenite lozinku prateći ovaj link {{link}}. Ovaj jedinstveni URL će uskoro isteći.

+

Možete da promenite lozinku prateći ovaj link {{link}}. Ovaj jedinstveni URL će uskoro isteći.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/tr_TR/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/tr_TR/body.tpl index 1ce1657ced..573750b10d 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/tr_TR/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/tr_TR/body.tpl @@ -1 +1 @@ -

Bu {{link}}'i takip ederek şifrenizi değiştirebilirsiniz. Bu benzersiz URL yakın zamanda geçersiz olacaktır.

+

Bu {{link}}'i takip ederek şifrenizi değiştirebilirsiniz. Bu benzersiz URL yakın zamanda geçersiz olacaktır.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/uk_UA/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/uk_UA/body.tpl index 54b0026035..505865cf4e 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/uk_UA/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/uk_UA/body.tpl @@ -1 +1 @@ -

Ви можете змінити свій пароль, перейшовши за цим посиланням {{link}}. Цей унікальний URL швидко сплине.

+

Ви можете змінити свій пароль, перейшовши за цим посиланням {{link}}. Цей унікальний URL швидко сплине.

diff --git a/application/Espo/Resources/templates/passwordChangeLink/zh_CN/body.tpl b/application/Espo/Resources/templates/passwordChangeLink/zh_CN/body.tpl index 0537adaabb..dbcb6a1e9f 100644 --- a/application/Espo/Resources/templates/passwordChangeLink/zh_CN/body.tpl +++ b/application/Espo/Resources/templates/passwordChangeLink/zh_CN/body.tpl @@ -1 +1 @@ -

您可以通过以下链接来更改密码{{link}}。此唯一网址即将过期

+

您可以通过以下链接来更改密码{{link}}。此唯一网址即将过期

diff --git a/application/Espo/Services/User.php b/application/Espo/Services/User.php index 61f8d5ad34..2dca80a826 100644 --- a/application/Espo/Services/User.php +++ b/application/Espo/Services/User.php @@ -555,13 +555,14 @@ class User extends Record $email->set([ 'subject' => $subject, 'body' => $body, - 'to' => $emailAddress + 'to' => $emailAddress, + 'isSystem' => true ]); if ($this->getConfig()->get('smtpServer')) { $this->getMailSender()->useGlobal(); } else { - $this->getMailSender()->useSmtp(array( + $this->getMailSender()->useSmtp([ 'server' => $this->getConfig()->get('internalSmtpServer'), 'port' => $this->getConfig()->get('internalSmtpPort'), 'auth' => $this->getConfig()->get('internalSmtpAuth'), @@ -569,7 +570,7 @@ class User extends Record 'password' => $this->getConfig()->get('internalSmtpPassword'), 'security' => $this->getConfig()->get('internalSmtpSecurity'), 'fromAddress' => $this->getConfig()->get('internalOutboundEmailFromAddress', $this->getConfig()->get('outboundEmailFromAddress')) - )); + ]); } $this->getMailSender()->send($email);