function piwik_user_id_hash in Piwik Web Analytics 7.2
Same name and namespace in other branches
- 8 piwik.module \piwik_user_id_hash()
Generate user id hash to implement USER_ID.
The USER_ID value should be a unique, persistent, and non-personally identifiable string identifier that represents a user or signed-in account across devices.
Parameters
int $uid: User id.
Return value
string User id hash.
1 call to piwik_user_id_hash()
- piwik_page_alter in ./
piwik.module - Implements hook_page_alter() to insert JavaScript to the appropriate scope/region of the page.
File
- ./
piwik.module, line 385 - Drupal Module: Piwik
Code
function piwik_user_id_hash($uid) {
return drupal_hmac_base64($uid, drupal_get_private_key() . drupal_get_hash_salt());
}