Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

delete_user_dash_tile()

Parameters

ColumnTypeDefaultDescription
$usertile
$user

Location

include/dash_functions.php lines 979 to 997

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 26th April 2024 21:35 Europe/London time based on the source file dated 25th April 2024 16:15 Europe/London time.