You are here

function _drupal_get_hash_salt in Node.js integration 6

1 call to _drupal_get_hash_salt()
nodejs_generate_content_token in ./nodejs.module
Generate a token for a piece of content.

File

./nodejs.module, line 720

Code

function _drupal_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', serialize($db_url)) : $drupal_hash_salt;
}