drupal_get_private_key
Definition
drupal_get_private_key()
includes/common.inc, line 933
Description
Ensure the private key variable used to generate tokens is set.
Return value
The private key
Related topics
| Name | Description |
|---|---|
| Input validation | Functions to validate user input. |
Code
<?php
function drupal_get_private_key() {
if (!($key = variable_get('drupal_private_key', 0))) {
$key = mt_rand();
variable_set('drupal_private_key', $key);
}
return $key;
}
?> 