Collections functions
General functions
Render functions
Theme permission functions
Resource functions

can_delete_collection()

Description

Check if user has the appropriate access to delete a collection.

Parameters

ColumnTypeDefaultDescription
$collection_data array Array of collection details, typically from get_collection()
$userref int Id of user
$k int "" External access key value

Return

boolean Returns true is the collection can be deleted or false if it cannot.

Location

include/collections_functions.php lines 6731 to 6741

Definition

 
function can_delete_collection($collection_data$userref$k "")
    {
    if(!(
$k == '' && (($userref == $collection_data['user']) || checkperm('h')) && $collection_data['cant_delete'] == 0))
        {
        return 
false;
        }
    else
        {
        return 
true;
        }
    }

This article was last updated 30th January 2023 08:05 Europe/London time based on the source file dated 6th January 2023 19:05 Europe/London time.