diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 44fffd6a7cc..5137b6f5487 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -138,7 +138,7 @@ $triggersendname = ''; // Disable triggers $paramname = 'id'; $mode = 'emailfortest'; $trackid = ($action == 'send' ? GETPOST('trackid', 'aZ09') : $action); -$sendcontext = ''; +$sendcontext = 'standard'; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 689c49ac76a..1f2374dffdf 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2601,7 +2601,7 @@ class User extends CommonObject } $trackid = 'use'.$this->id; - $sendcontext = 'password'; + $sendcontext = 'passwordreset'; $mailfile = new CMailFile( $subject, diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 58458fae5c6..bb99ba49e33 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -157,7 +157,7 @@ if (empty($reshook)) { // Technical failure $message = '
'.$langs->trans("ErrorFailedToChangePassword").'
'; } else { - // Success + // Success to set temporary password, send email if ($edituser->send_password($user, $newpassword, 1) > 0) { $message .= $messagewarning; $username = ''; diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index fe3a4760003..1dfa38ca92f 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -506,7 +506,7 @@ class CodingPhpTest extends CommonClassTest "'content'", "'replacestring'", "'htmlheader'", "'WEBSITE_HTML_HEADER'", "'WEBSITE_CSS_INLINE'", "'WEBSITE_JS_INLINE'", "'WEBSITE_MANIFEST_JSON'", "'PAGE_CONTENT'", "'WEBSITE_README'", "'WEBSITE_LICENSE'", '"mysqldump"', '"postgresqldump"', "'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'", - '"MAIN_MAIL_SMTPS_PW"', '"MAIN_MAIL_SMTPS_PW_EMAILING"', '"MAIN_MAIL_SMTPS_PW_TICKET"'))) { + '"MAIN_MAIL_SMTPS_PW"', '"MAIN_MAIL_SMTPS_PW_EMAILING"', '"MAIN_MAIL_SMTPS_PW_TICKET"', '"MAIN_MAIL_SMTPS_PW_PASSWORDRESET"'))) { $ok = false; break; }