Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_session_api_key()

Description

Return the session specific key for the given user.

Parameters

ColumnTypeDefaultDescription
$user integer The user ID

Return

string

Location

include/api_functions.php lines 393 to 399

Definition

 
function get_session_api_key($user)
    {
    global 
$scramble_key;
    
$private_key get_api_key($user);
    
$usersession ps_value("SELECT session value FROM user where ref = ?", array("i",$user), "");
    return 
hash_hmac("sha256""{$usersession}{$private_key}"$scramble_key);
    }

This article was last updated 24th September 2022 22:35 Europe/London time based on the source file dated 5th September 2022 10:20 Europe/London time.