Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_usergroup_available_tiles()

Parameters

ColumnTypeDefaultDescription
$user_group_id
$tile ''

Location

include/dash_functions.php lines 845 to 859

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 '';
    if(
'' != $tile)
        {
        
$tile_sql "AND dt.ref = '" escape_check($tile) . "'";
        }

    return 
sql_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 = '{$user_group_id}{$tile_sql} ORDER BY udt.default_order_by ASC");
    }

This article was last updated 3rd December 2020 13:35 Europe/London time based on the source file dated 3rd November 2020 16:55 Europe/London time.