1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/objects/userGroupsDelete.json.php
2022-03-17 11:43:59 -03:00

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().'"}';