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

18 lines
653 B
PHP
Raw Permalink Normal View History

2024-05-27 16:59:30 +02:00
<?php
namespace Bdp\Modules\EventParticipants\Controllers;
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] - ");
}
}