X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetgrp%2Fmail.inc.php;h=891146a6270fa0866b5036dfe73a366ec79988a2;hb=830652769f5e756edb7239dc048a0d52c893d348;hp=090b5b5964087076acf9fbde4dda839fa8e235c3;hpb=353f2d2b11c4e3c6c0bc3553813368b6f42fa9c6;p=platal.git diff --git a/modules/xnetgrp/mail.inc.php b/modules/xnetgrp/mail.inc.php index 090b5b5..891146a 100644 --- a/modules/xnetgrp/mail.inc.php +++ b/modules/xnetgrp/mail.inc.php @@ -1,6 +1,6 @@ isFemale() ? 'Chère' : 'Cher'; - $nom = $user->displayName(); - $pnom = ''; + $dear = $user->isFemale() ? 'Chère' : 'Cher'; + $lastname = $user->lastName(); + $firstname = $user->firstName(); } else { - $cher = 'Cher(e)'; - $nom = $user; - $pnom = ''; + $dear = 'Cher(e)'; + $lastname = ''; + $firstname = $user; } $text = str_ireplace(array('', '', ''), - array($cher, $nom, $pnom), $body); + array($dear, $lastname, $firstname), $body); $mailer->addTo($user); if ($replyto) { $mailer->addHeader('Reply-To', $replyto);