drupal_get_private_key
function drupal_get_private_key
drupal_get_private_key()
Ensures the private key variable used to generate tokens is set.
Return value
The private key.
File
- includes/common.inc, line 5176
- 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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_get_private_key/7.x