<h1><i class="fa-solid fa-user-secret"></i> Impersonation Panel</h1>

<table>
<tr>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Action</th>
</tr>

<?php foreach($users as $u): ?>
<tr>
<td><?= $u['id'] ?></td>
<td><?= htmlspecialchars($u['first_name'].' '.$u['last_name']) ?></td>
<td><?= htmlspecialchars($u['email']) ?></td>
<td>
<a class="btn" href="/easychair/admin/impersonate/loginAs?id=<?= $u['id'] ?>">
Login As
</a>
</td>
</tr>
<?php endforeach; ?>
</table>

<?php if(isset($_SESSION['impersonator'])): ?>
<hr>
<a class="btn" href="/easychair/admin/impersonate/revert">
Revert to SuperAdmin
</a>
<?php endif; ?>
