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

download_link_check_key()

Description

Check the download key for a specific user/resource combination

Parameters

ColumnTypeDefaultDescription
$download_key string Download key
$resource integer Resource ID

Return

string

Location

include/resource_functions.php lines 7802 to 7819

Definition

 
function download_link_check_key($download_key$resource)
    {
    
$download_link_parts explode(":"$download_key);

    if(
count($download_link_parts) != 2)
        {
        return 
false;
        }

    
$download_link_id   $download_link_parts[0];
    
$keycheck download_link_generate_key($download_link_id,$resource);
    if(
$keycheck != $download_key)
        {
        return 
false;
        }

    return 
true;
    }

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