<?php
require_once __DIR__ . '/../app/bootstrap/init.php';
use App\Core\Database;

$db = Database::getInstance();
$users = $db->query("SELECT id, email, name FROM users")->fetchAll();

echo "ID | Email | Name\n";
echo "----------------------\n";
foreach ($users as $user) {
    $email = App\Core\Encryption::decrypt($user['email']) ?: $user['email'];
    $name = App\Core\Encryption::decrypt($user['name']) ?: $user['name'];
    echo "{$user['id']} | $email | $name\n";
}
