Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

add_usergroup_dash_tile()

Parameters

ColumnTypeDefaultDescription
$usergroup
$tile
$default_order_by

Location

include/dash_functions.php lines 685 to 715

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 12th July 2020 06:05 Europe/London time based on the source file dated 24th June 2020 14:38 Europe/London time.