Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 6769 to 6775

Definition

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

This article was last updated 19th March 2024 03:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.