}
if (count($error_detected) == 0) {
+ // send email to member
+ if (isset($post['mail_confirm']) && $post['mail_confirm'] == '1') {
+ $contrib->setSendmail(); //flag to send creation email
+ }
+
$store = $contrib->store();
if ($store === true) {
$this->flash->addMessage(
}
if (count($error_detected) == 0) {
- // send email to member
- if (isset($post['mail_confirm']) && $post['mail_confirm'] == '1') {
- $contrib->setSendmail(); //flag to send creation email
- }
-
$this->session->contribution = null;
if ($contrib->isTransactionPart() && $contrib->transaction->getMissingAmount() > 0) {
//new contribution
/**
* Send account email to member
*
- * @param Adherent $member Member
- * @param boolean $new New member or editing existing one
+ * @param Contribution $contrib Contribution
+ * @param boolean $new New contribution or editing existing one
*
* @return void
*/
- private function sendContribEmail(Adherent $member, $new)
+ private function sendContribEmail(Contribution $contrib, $new)
{
if ($this->preferences->pref_mail_method == GaletteMail::METHOD_DISABLED) {
//if email has been disabled in the preferences, we should not be here ;