Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 6257 to 6263

Definition

 
function can_delete_collection(array $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 15th February 2025 20:35 Europe/London time based on the source file dated 13th February 2025 10:30 Europe/London time.