function drupal_get_private_key

cis7 common.inc drupal_get_private_key()
cle7 common.inc drupal_get_private_key()
elmsmedia7 common.inc drupal_get_private_key()
icor7 common.inc drupal_get_private_key()
meedjum_blog7 common.inc drupal_get_private_key()
mooc7 common.inc drupal_get_private_key()

Ensures the private key variable used to generate tokens is set.

Return value

The private key.

9 calls to drupal_get_private_key()
advagg_admin_operations_form in sites/all/modules/ulmus/advagg/advagg.admin.inc
Form builder; Do advagg operations.
advagg_admin_toggle_bypass_cookie in sites/all/modules/ulmus/advagg/advagg.admin.inc
Set or remove the AdvAggDisabled cookie.
advagg_enabled in sites/all/modules/ulmus/advagg/advagg.module
Function used to see if aggregation is enabled.
DrupalWebTestCase::drupalGetToken in modules/simpletest/drupal_web_test_case.php
Generate a token for the currently logged in user.
drupal_get_token in includes/common.inc
Generates a token based on $value, the user session, and the private key.

... See full list

File

includes/common.inc, line 5056
Common functions that many Drupal modules will need to reference.

Code

function drupal_get_private_key() {
  if (!($key = variable_get('drupal_private_key', 0))) {
    $key = drupal_random_key();
    variable_set('drupal_private_key', $key);
  }
  return $key;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.