prepare("INSERT INTO users (login,email,password_hash,salt,avatar_path,role,invite_id) VALUES (?,?,?,?,?,?,?)"); $role = "newbie"; $s->bind_param("sssssss", $login, $email, $pwd_hash, $salt, $avatar_path, $role, $invite_id); $result = ($s->execute() !== false); if (!$result) return new ReturnT(err_code: E_DBE_INSERTFAIL, err_desc: "cant insert record to users DB"); return new ReturnT(data: $result); } if (Utils_ThisFileIsRequested(__FILE__)) { require_once("../_json.php"); // HACK: for debugging purposes. Will be removed later if ($Config["debug"]) $_POST = $_REQUEST; // Create account $result = User_Create_Method($_POST); // Checking result if ($result->IsError()) $result->ThrowJSONError(); else JSON_ReturnData(["success" => $result->GetData()]); } ?>