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

add_usergroup_dash_tile()

Parameters

ColumnTypeDefaultDescription
$usergroup
$tile
$default_order_by

Location

include/dash_functions.php lines 709 to 739

Definition

 
function add_usergroup_dash_tile($usergroup$tile$default_order_by)
    {
    if(!
is_numeric($usergroup) || !is_numeric($tile))
        {
        return 
false;
        }

    
$reorder true;
    if(!
is_numeric($default_order_by))
        {
        
$default_order_by append_usergroup_position($usergroup);
        
$reorder          false;
        }

    
$existing sql_query("SELECT * FROM usergroup_dash_tile WHERE usergroup = '{$usergroup}' AND dash_tile = {$tile}");
    if(!
$existing)
        {
        
$result sql_query("INSERT INTO usergroup_dash_tile (usergroup, dash_tile, default_order_by) VALUES ('{$usergroup}', '{$tile}', '{$default_order_by}')");
        }
    else
        {
        return 
$existing;
        }

    if(
$reorder)
        {
        
reorder_usergroup_dash($usergroup);
        }

    return 
true;
    }

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