kompass/modules/event-participants/Controllers/class-deletemember.php
2024-05-31 22:47:04 +02:00

17 lines
552 B
PHP

<?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);
}
}