Collections functions
Encryption functions
General functions
Theme permission 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 2387 to 2396

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 10th July 2020 23:35 Europe/London time based on the source file dated 9th July 2020 17:22 Europe/London time.