Skip to content

Commit

Permalink
#295 [Attendants] fix: setEventMessage send mail
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed May 4, 2023
1 parent f0207ed commit 09edc40
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions view/saturne_attendants.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,18 @@
if (dol_strlen($usertmp->email)) {
$signatory->email = $usertmp->email;
$signatory->update($user, true);
} else {
setEventMessage($langs->trans('NoEmailSet', $langs->trans($signatory->role) . ' ' . strtoupper($signatory->lastname) . ' ' . $signatory->firstname), 'warnings');
}
} elseif ($signatory->element_type == 'socpeople') {
$contact->fetch($signatory->element_id);
if (dol_strlen($contact->email)) {
$signatory->email = $contact->email;
$signatory->update($user, true);
} else {
setEventMessage($langs->trans('NoEmailSet', $langs->trans($signatory->role) . ' ' . strtoupper($signatory->lastname) . ' ' . $signatory->firstname), 'warnings');
}
}
} else {
setEventMessage($langs->trans('NoEmailSet', $langs->trans($signatory->role) . ' ' . strtoupper($signatory->lastname) . ' ' . $signatory->firstname), 'warnings');
}

$sendto = $signatory->email;
Expand Down

0 comments on commit 09edc40

Please sign in to comment.