function _googleanalytics_get_hash_salt in Google Analytics 6.4
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 _googleanalytics_get_hash_salt()
- googleanalytics_add_js in ./
googleanalytics.module - Adds Google Analytics tracking scripts.
File
- ./
googleanalytics.module, line 633 - Drupal Module: Google Analytics
Code
function _googleanalytics_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;
}