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

delete_collection_access_key()

Description

Delete a specific collection access key, withdrawing access via that key to the collection in question

Parameters

ColumnTypeDefaultDescription
$collection integer
$access_key string

Return

void

Location

include/collections_functions.php lines 2649 to 2658

Definition

 
function delete_collection_access_key($collection,$access_key)
    {
    
# Get details for log
    
$users sql_value("select group_concat(DISTINCT email ORDER BY email SEPARATOR ', ') value from external_access_keys where collection='" escape_check($collection) . "' and access_key = '" escape_check($access_key) . "' group by access_key """);
    
# Deletes the given access key.
    
sql_query("delete from external_access_keys where access_key='" escape_check($access_key) . "' and collection='" escape_check($collection) . "'");
    
# log changes
    
collection_log($collection,"t","",$users);

    }

This article was last updated 2nd December 2020 00:05 Europe/London time based on the source file dated 1st December 2020 11:10 Europe/London time.