<?php
    if ( !$user['superAdmin'] ) {
        exit;
    }
    
    $userId = $_GET['id'];

    $db->delete('auth_token', ['userId' => $userId]);

    session_start();
    $_SESSION['error'] = 'User logged out of all devices';

    header('Location: '.URL_APP_ADMIN.'/?page=u');
    exit;
?>