<?php
require_once __DIR__.'/includes/functions.php';
if (!empty($_SESSION['impersonator_admin_id'])) {
    unset($_SESSION['user_id']);
    $_SESSION['admin_id'] = (int)$_SESSION['impersonator_admin_id'];
    unset($_SESSION['impersonator_admin_id']);
    flash('success','Returned to Super Admin.');
    redirect('admin/users.php');
}
redirect('index.php');
