Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 199 to 205

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 19th March 2024 07:35 Europe/London time based on the source file dated 6th March 2024 14:45 Europe/London time.