Coding standards
Security in ResourceSpace
Developer reference
Database
Mcp browse functions
Mcp report functions
Mcp management functions
Core feature functions
Embed functions

core_feature_enabled()

Description

Check whether a core feature is available to a user group.

Parameters

ColumnTypeDefaultDescription
$name string Core feature name.
$group int|null null: bool { if !issetCORE_FEATURES[$name] Group to check, defaulting to the current user or the pre-login context.

Return

bool Whether the feature is enabled for this group.

Location

include/core_feature_functions.php lines 146 to 156

Definition

 
function core_feature_enabled(string $name, ?int $group = null): bool
{
    if (!isset(
CORE_FEATURES[$name])) {
        return 
false;
    }
    
$feature = get_active_core_features()[$name] ?? null;
    return 
$feature !== null && extension_enabled_for_group(
        
$feature,
        
$group ?? (isset($GLOBALS['usergroup']) ? (int) $GLOBALS['usergroup'] : null)
    );
}

This article was last updated 4th December 2026 17:35 Europe/London time based on the source file dated 4th December 2026 14:10 Europe/London time.