Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

generateUserFilenameUID()

Description

Generate a UID for filnames that can be different from user to user (e.g. contact sheets)

Parameters

ColumnTypeDefaultDescription
$user_id integer

Return

string

Location

include/file_functions.php lines 38 to 57

Definition

 
function generateUserFilenameUID($user_id)
    {
    if(!
is_numeric($user_id) || >= $user_id)
        {
        
trigger_error('Bad parameter for generateUserFilenameUID()!');
        }

    global 
$rs_session$scramble_key;

    
$filename_uid '';

    if(isset(
$rs_session))
        {
        
$filename_uid .= $rs_session;
        }

    
$filename_uid .= $user_id;

    return 
substr(hash('sha256'$filename_uid $scramble_key), 015);
    }

This article was last updated 10th July 2020 20:35 Europe/London time based on the source file dated 22nd April 2020 14:54 Europe/London time.