1 common.inc backdrop_get_private_key()

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

Return value

The private key.

File

core/includes/common.inc, line 5713
Common functions that many Backdrop modules will need to reference.

Code

function backdrop_get_private_key() {
  if (!($key = state_get('private_key'))) {
    $key = backdrop_random_key();
    state_set('private_key', $key);
  }
  return $key;
}