Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 7029 to 7046

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 23rd November 2020 18:35 Europe/London time based on the source file dated 13th November 2020 16:50 Europe/London time.