servnest/sftpgo-auth.php
Miraty 6dbc63a36a Add form to delete account
Move service-specific deletion code to functions
2022-06-18 04:22:05 +02:00

13 lines
377 B
PHP

<?php
require "common/init.php";
$authData = json_decode(file_get_contents("php://input"), true);
$user = json_decode($authData['user'], true);
if (checkPassword($authData['username'], $authData['password']) === true) {
echo '{"status":1,"username":"' . $authData['username'] . '","permissions":{"/":["*"]}}';
http_response_code(200);
} else {
http_response_code(403);
}