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

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 3574 to 3589

Definition

 
function delete_collection_access_key($collection,$access_key)
    {
    
# Get details for log
    
$users ps_value("SELECT group_concat(DISTINCT email ORDER BY email SEPARATOR ', ') value FROM external_access_keys WHERE collection=? AND access_key = ? group by access_key ", array("i",$collection,"s",$access_key),"");
    
# Deletes the given access key.
    
$params=array("s",$access_key);
    
$sql "DELETE FROM external_access_keys WHERE access_key=?";
    if(
$collection != 0)
        {
        
$sql .= " AND collection=?";
        
$params[]="i";$params[]=$collection;
        }
    
ps_query($sql,$params);
    
# log changes
    
collection_log($collection,LOG_CODE_COLLECTION_STOPPED_RESOURCE_ACCESS,"",$users " (" $access_key")");
    }

This article was last updated 14th December 2024 18:35 Europe/London time based on the source file dated 12th December 2024 10:55 Europe/London time.