<?php
require 'db.php';

$stmt = $pdo->query("
  SELECT 
        u.id,
        CASE 
            WHEN u.is_verified = 1 
            THEN 1 ELSE 0
        END AS is_verified
    FROM users u ORDER BY is_verified ASC;
");

echo json_encode($stmt->fetchAll(PDO::FETCH_ASSOC));
