api/user/__admin_session.php and random tweaks

This commit is contained in:
2023-08-30 05:16:15 +03:00
parent 074ce120e9
commit ae719995ee
7 changed files with 44 additions and 11 deletions

View File

@@ -26,6 +26,10 @@ function User_Create ($login, $password, $email = null, $invite_id = null, $avat
if (ThisFileIsRequested(__FILE__)) {
require_once("../_json.php");
// Dirty hack for debugging purposes. Will be removed later
if ($Config["debug"])
$_POST = $_REQUEST;
// If registration turned off
if (!$Config["registration"]["active"]) {
ReturnJSONError($Err_DP_RegClosed, "registrations are closed");