<?php
function isGlobalSessionTerminationEnabled() {
    global $pdo;
    
    $stmt = $pdo->prepare("SELECT setting_value FROM wp_settings WHERE setting_key = 'global_session_termination_enabled'");
    $stmt->execute();
    $result = $stmt->fetchColumn();
    
    // If record exists, use its value. If not found, default to true (on)
    if ($result !== false) {
        return (int)$result === 1;
    }
    
    return true; // Default if not found
}
?>