fix the member e-mail on resign and validation.

Since the member module is only using the new configuration and the name of the global variabels changed you have a blocking e-mail error when you try to resign or validate a member. In order to fix that I fallback on the previous variable like that it's still working.

[see: #9640]
This commit is contained in:
De Coninck Laurent 2018-10-19 17:23:53 +02:00
parent 33cd0e84d2
commit 402bbbe839

View File

@ -634,6 +634,12 @@ if (empty($reshook))
$msg = $arraydefaultmessage->content;
}
if (empty($labeltouse)) {
//fallback on the old configuration.
$subject = $conf->global->ADHERENT_MAIL_VALID_SUBJECT;
$msg = $conf->global->ADHERENT_MAIL_VALID;
}
$substitutionarray=getCommonSubstitutionArray($outputlangs, 0, null, $object);
complete_substitutions_array($substitutionarray, $outputlangs, $object);
$subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
@ -707,6 +713,12 @@ if (empty($reshook))
$msg = $arraydefaultmessage->content;
}
if (empty($labeltouse)) {
//fallback on the old configuration.
$subject = $conf->global->ADHERENT_MAIL_RESIL_SUBJECT;
$msg = $conf->global->ADHERENT_MAIL_RESIL;
}
$substitutionarray=getCommonSubstitutionArray($outputlangs, 0, null, $object);
complete_substitutions_array($substitutionarray, $outputlangs, $object);
$subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);