You are here

function _warden_get_local_token in Warden 6

Same name and namespace in other branches
  1. 7 warden.module \_warden_get_local_token()

Get the local token or generate it if it is not set.

Return value

string The local token

3 calls to _warden_get_local_token()
warden_add_site in ./warden.admin.inc
Form submission callback.
warden_form in ./warden.admin.inc
Page callback: System settings settings.
_warden_generate_site_data in ./warden.page.inc
Generate all the site's data for Warden.

File

./warden.module, line 129
Drupal system status

Code

function _warden_get_local_token() {
  $local_token = variable_get('warden_token', '');
  if (empty($local_token)) {
    $local_token = hash('sha256', mt_rand());
    variable_set('warden_token', $local_token);
  }
  return $local_token;
}