kompass/modules/event-participants/Controllers/class-membermailform.php

19 lines
706 B
PHP
Raw Normal View History

2024-05-27 16:59:30 +02:00
<?php
namespace Bdp\Modules\EventParticipants\Controllers;
use Bdp\Modules\EventParticipants\Models\EventGroup;
use Bdp\Modules\EventParticipants\Models\EventParticipant;
class MemberMailFormController {
public function __construct() {
global $_REQUEST;
$participant = EventParticipant::loadById($_REQUEST['participant-id']);
if ($participant->email_1 === $participant->email_2) {
$participant->email_2 = '';
}
$to = $participant->vorname . ' <' . $participant->email_1 .'>' .
('' !== $participant->email_2 ? ', ' . $participant->vorname . ' <' . $participant->email_2 .'>' : '');
kompass_print_mail_compose($to, "[KoPfiLa '24] - ");
}
}