function _piwik_get_hash_salt in Piwik Web Analytics 6.2
Backport of https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drup...
Gets a salt useful for hardening against SQL injection.
1 call to _piwik_get_hash_salt()
- piwik_footer in ./
piwik.module - Implementation of hook_footer() to insert Javascript at the end of the page.
File
- ./
piwik.module, line 513 - Drupal Module: Piwik
Code
function _piwik_get_hash_salt() {
global $drupal_hash_salt, $db_url;
// If the $drupal_hash_salt variable is empty, a hash of the serialized
// database credentials is used as a fallback salt.
return empty($drupal_hash_salt) ? hash('sha256', $db_url) : $drupal_hash_salt;
}