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 990 to 1008

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);
    
ps_query("DELETE FROM user_dash_tile WHERE ref= ? and user= ?", ['i'$usertile'i'$user]);

    if (!isset(
$row["dash_tile"]) || !is_numeric($row["dash_tile"])) {return false;}
    
    
$existing ps_query("SELECT count(*) as 'count' FROM user_dash_tile WHERE dash_tile= ?", ['i'$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 3rd October 2022 13:05 Europe/London time based on the source file dated 27th September 2022 15:05 Europe/London time.