mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
13 lines
447 B
PHP
13 lines
447 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
global $global, $config;
|
|
if (!isset($global['systemRootPath'])) {
|
|
require_once '../videos/configuration.php';
|
|
}
|
|
require_once $global['systemRootPath'] . 'objects/user.php';
|
|
if (!User::isAdmin() || empty($_POST['id'])) {
|
|
die('{"error":"'.__("Permission denied").'"}');
|
|
}
|
|
require_once 'userGroups.php';
|
|
$obj = new UserGroups($_POST['id']);
|
|
echo '{"status":"'.$obj->delete().'"}';
|