Collections functions
General 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 6843 to 6853

Definition

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

This article was last updated 29th November 2023 08:05 Europe/London time based on the source file dated 21st November 2023 15:25 Europe/London time.