USERS_DIR added to config

This commit is contained in:
Ryan
2025-03-03 12:08:11 -05:00
committed by GitHub
parent cdb4439ca3
commit d331436f13
6 changed files with 11 additions and 5 deletions

View File

@@ -1,9 +1,10 @@
<?php
require 'config.php';
session_start();
header('Content-Type: application/json');
// Check if users.txt is empty or doesn't exist
$usersFile = __DIR__ . '/users.txt';
$usersFile = USERS_FILE;
if (!file_exists($usersFile) || trim(file_get_contents($usersFile)) === '') {
// Return JSON indicating setup mode
echo json_encode(["setup" => true]);