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

empty_user_dash()

Parameters

ColumnTypeDefaultDescription
$user
$purge true

Location

include/dash_functions.php lines 964 to 979

Definition

 
function empty_user_dash($user,$purge=true)
    {
    
$usertiles sql_query("SELECT dash_tile FROM user_dash_tile WHERE user_dash_tile.user='".escape_check($user)."'");
    
sql_query("DELETE FROM user_dash_tile WHERE user='".$user."'");
    if(
$purge)
        {
        foreach(
$usertiles as $tile)
            {
            
$existing sql_query("SELECT count(*) as 'count' FROM user_dash_tile WHERE dash_tile='".$tile["dash_tile"]."'");
            if(
$existing[0]["count"]<1)
                {
                
delete_dash_tile($tile["dash_tile"]);
                }
            }
        }    
    }

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