<?php
/**
 * Redirect to admin users page
 */
define('APP_RUNNING', true);
session_start();
require_once 'db_connect.php';
require_once 'includes/auth.php';

// Check if user is admin
if(!isset($_SESSION['user_id']) || !in_array($_SESSION['role'], ['admin', 'user_admin'])) {
    header('Location: login');
    exit;
}

// Redirect to admin users page
header('Location: admin/users');
exit;
