18 lines
520 B
PHP
18 lines
520 B
PHP
<?php
|
|
|
|
use Bdp\Modules\Gruppen\Controllers\MainController;
|
|
|
|
class CreateGroupAction
|
|
{
|
|
public static function execute(array $newData)
|
|
{
|
|
global $dbHandler;
|
|
if (!current_user_can('create_groups')) {
|
|
kompass_print_message_box(__('You are not allowed to create a group', BDP_LV_PLUGIN_SLUG), 'error');
|
|
}
|
|
|
|
global $dbHandler;
|
|
$dbHandler->insertRows(MainController::KOMPASS_STAMMESGRUPPEN_GRUPPEN, $newData);
|
|
kompass_print_message_box(__('The group was created.', BDP_LV_PLUGIN_SLUG));
|
|
}
|
|
} |