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

17 lines
552 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\EventParticipant;
class DeleteMemberController {
public function __construct() {
global $_POST, $_REQUEST, $dbHandler;
$participant = EventParticipant::loadById($_REQUEST['participant-id']);
$dbHandler->deleteFromDb(MainController::KOMPASS_EVENTS_PARTICIPANTS, ['id' => $participant->id]);
kompass_print_message_box(__('The participant was deleted.', BDP_LV_PLUGIN_SLUG));
new ListGroupsAndMembersController($participant->eventId);
}
}