You are here

function drupal_get_token in Drupal 6

Same name and namespace in other branches
  1. 4 includes/common.inc \drupal_get_token()
  2. 5 includes/common.inc \drupal_get_token()
  3. 7 includes/common.inc \drupal_get_token()

Generate a token based on $value, the current user session and private key.

Parameters

$value: An additional value to base the token on.

7 calls to drupal_get_token()
aggregator_view in modules/aggregator/aggregator.admin.inc
Displays the aggregator administration page.
batch_process in includes/form.inc
Processes the batch.
drupal_prepare_form in includes/form.inc
Prepares a structured form array by adding required elements, executing any hook_form_alter functions, and optionally inserting a validation token to prevent tampering.
form_set_cache in includes/form.inc
Store a form in the cache.
system_date_time_settings in modules/system/system.admin.inc
Form builder; Configure the site date and time settings.

... See full list

File

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

Code

function drupal_get_token($value = '') {
  $private_key = drupal_get_private_key();
  return md5(session_id() . $value . $private_key);
}