diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 2722454a934..532d9c466ff 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -184,7 +184,7 @@ class Adherent extends CommonObject */ function makeSubstitution($text) { - global $langs; + global $conf,$langs; $birthday = dol_print_date($this->naiss,'day'); @@ -202,8 +202,11 @@ class Adherent extends CommonObject $infos.= $langs->transnoentities("Town").": ".$this->town."\n"; $infos.= $langs->transnoentities("Country").": ".$this->country."\n"; $infos.= $langs->transnoentities("EMail").": ".$this->email."\n"; - $infos.= $langs->transnoentities("Login").": ".$this->login."\n"; - $infos.= $langs->transnoentities("Password").": ".$this->pass."\n"; + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) + { + $infos.= $langs->transnoentities("Login").": ".$this->login."\n"; + $infos.= $langs->transnoentities("Password").": ".$this->pass."\n"; + } $infos.= $langs->transnoentities("Birthday").": ".$birthday."\n"; $infos.= $langs->transnoentities("Photo").": ".$this->photo."\n"; $infos.= $langs->transnoentities("Public").": ".yn($this->public); diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 28363f36be4..2d72004f6a0 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -201,8 +201,13 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes') { if ($object->email) { - $result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent")); - $mesg=$langs->trans("CardSent"); + $from=$conf->email_from; + if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM; + + $result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent")); + + $langs->load("mails"); + $mesg=$langs->trans("MailSuccessfulySent", $from, $object->email); } } @@ -1089,7 +1094,9 @@ if ($action == 'edit') if ($rowid && $action != 'edit') { - /* ************************************************************************** */ + dol_htmloutput_mesg($mesg); + + /* ************************************************************************** */ /* */ /* Mode affichage */ /* */