fix: Remove redundant session_start from get_users.php
RateLimitMiddleware already starts the session. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,7 @@ RateLimitMiddleware::apply('api');
|
|||||||
try {
|
try {
|
||||||
require_once dirname(__DIR__) . '/config/config.php';
|
require_once dirname(__DIR__) . '/config/config.php';
|
||||||
|
|
||||||
// Check authentication
|
// Check authentication (session already started by RateLimitMiddleware)
|
||||||
session_start();
|
|
||||||
if (!isset($_SESSION['user']) || !isset($_SESSION['user']['user_id'])) {
|
if (!isset($_SESSION['user']) || !isset($_SESSION['user']['user_id'])) {
|
||||||
http_response_code(401);
|
http_response_code(401);
|
||||||
echo json_encode(['success' => false, 'error' => 'Authentication required']);
|
echo json_encode(['success' => false, 'error' => 'Authentication required']);
|
||||||
|
|||||||
Reference in New Issue
Block a user