mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
24 lines
748 B
PHP
24 lines
748 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
require_once __DIR__.'/../../videos/configuration.php';
|
|
require_once $global['systemRootPath'] . 'plugin/UserConnections/Objects/Users_connections.php';
|
|
|
|
$plugin = AVideoPlugin::loadPluginIfEnabled('UserConnections');
|
|
|
|
if(!User::isLogged()){
|
|
forbiddenPage('Must Login');
|
|
}
|
|
|
|
$obj = new stdClass();
|
|
$obj->error = true;
|
|
$obj->msg = "";
|
|
$obj->users_id = intval($_REQUEST['users_id']);
|
|
|
|
if(empty($obj->users_id)){
|
|
forbiddenPage('users_id is empty');
|
|
}
|
|
|
|
$obj->response = UserConnections::disconnectMe($obj->users_id);
|
|
$obj->error = empty($obj->response);
|
|
$obj->status = UserConnections::getMyConnectionStatus($obj->users_id);
|
|
echo json_encode($obj);
|