Fix title of email to reset password

This commit is contained in:
Laurent Destailleur 2021-04-17 03:32:05 +02:00
parent 0d8a354934
commit 01c21d2d10

View File

@ -2050,7 +2050,7 @@ class User extends CommonObject
public function send_password($user, $password = '', $changelater = 0)
{
// phpcs:enable
global $conf, $langs;
global $conf, $langs, $mysoc;
global $dolibarr_main_url_root;
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
@ -2081,7 +2081,7 @@ class User extends CommonObject
$appli = $conf->global->MAIN_APPLICATION_TITLE;
}
$subject = $outputlangs->transnoentitiesnoconv("SubjectNewPassword", $appli);
$subject = '['.$mysoc->name.'] '.$outputlangs->transnoentitiesnoconv("SubjectNewPassword", $appli);
// Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));