Collections functions
General functions
Render functions
Theme permission functions
Resource functions

delete_user_dash_tile()

Parameters

ColumnTypeDefaultDescription
$usertile
$user

Location

include/dash_functions.php lines 967 to 985

Definition

 
function delete_user_dash_tile($usertile,$user)
    {
    global 
$lang;
    if(!
is_numeric($usertile) || !is_numeric($user)){return false;}
    
    
$row get_user_tile($usertile,$user);
    
sql_query("DELETE FROM user_dash_tile WHERE ref='".$usertile."' and user='".$user."'");

    if (!isset(
$row["dash_tile"]) || !is_numeric($row["dash_tile"])) {return false;}
    
    
$existing sql_query("SELECT count(*) as 'count' FROM user_dash_tile WHERE dash_tile='".$row["dash_tile"]."'");
    
    if(
$existing[0]["count"]<1)
        {
        
$tile get_tile($row["dash_tile"]);
        
delete_dash_tile($row["dash_tile"]);
        
log_activity($lang['manage_all_dash'],LOG_CODE_DELETED,($tile["title"]??""),'dash_tile',NULL,$row["dash_tile"]);
        }
    }

This article was last updated 20th May 2022 09:05 Europe/London time based on the source file dated 28th April 2022 13:40 Europe/London time.