1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00
Oinktube/plugin/CustomizeUser/setPassword.json.php
2022-01-06 21:30:01 +08:00

26 lines
613 B
PHP

<?php
require_once '../../videos/configuration.php';
header('Content-Type: application/json');
$obj = new stdClass();
$obj->error = true;
$obj->msg = '';
if (!User::isAdmin()) {
$obj->msg = ('Must be admin');
die(json_encode($obj));
}
$users_id = intval(@$_REQUEST['users_id']);
if (empty($users_id)) {
$obj->msg = ('Empty users_id');
die(json_encode($obj));
}
$obj->ProfilePassword = intval(@$_REQUEST['ProfilePassword']);
$obj->users_id = $users_id;
$obj->response = User::setProfilePassword($users_id, $obj->ProfilePassword) ;
$obj->error = empty($obj->response);
die(json_encode($obj));