<?php
declare(strict_types=1);
require __DIR__ . '/_common.php';
header('Content-Type: text/plain');
echo "role: " . (ec_current_role() ?? 'none') . "\n";
echo "user_id: " . ($_SESSION['user']['id'] ?? '—') . "\n";
echo "branch_ids(array): " . (isset($_SESSION['branch_ids']) ? json_encode($_SESSION['branch_ids']) : '[]') . "\n";
echo "branch_ids(string): " . (string)($_SESSION['user']['branch_ids'] ?? '') . "\n";
list($w,$p) = coord_branch_scope('b');
echo "scope where: $w\n";
echo "params: " . json_encode($p) . "\n";
