Collections functions
Encryption functions
General functions
Theme permission functions
Resource 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 6593 to 6610

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