Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_usergroup_available_tiles()

Parameters

ColumnTypeDefaultDescription
$user_group_id
$tile ''

Location

include/dash_functions.php lines 888 to 904

Definition

 
function get_usergroup_available_tiles($user_group_id$tile '')
    {
    if(!
is_numeric($user_group_id))
        {
        
trigger_error('$user_group_id has to be a number');
        }

    
$tile_sql '';
    
$params = [];
    if(
'' != $tile)
        {
        
$tile_sql "AND dt.ref = ?";
        
$params = ['i'$tile];
        }
    
$params[] = 'i'$params[] = $user_group_id;
    return 
ps_query("SELECT dt.ref, dt.ref AS `tile`, dt.title, dt.txt, dt.link, dt.url, dt.reload_interval_secs, dt.resource_count, dt.all_users, dt.allow_delete, dt.default_order_by, udt.order_by , 1 AS 'dash_tile' FROM dash_tile AS dt LEFT JOIN usergroup_dash_tile AS udt ON dt.ref = udt.dash_tile WHERE dt.all_users = 1 AND udt.usergroup = ? {$tile_sql} ORDER BY udt.default_order_by ASC"$params);
    }

This article was last updated 5th October 2022 03:35 Europe/London time based on the source file dated 27th September 2022 15:05 Europe/London time.