function drupal_get_token

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

Parameters

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

Return value

string A 43-character URL-safe token for validation, based on the user session ID, the global $drupal_hash_salt variable from settings.php, and the 'drupal_private_key' configuration variable.

12 calls to drupal_get_token()
aggregator_view in drupal/core/modules/aggregator/aggregator.admin.inc
Displays the aggregator administration page.
comment_links in drupal/core/modules/comment/comment.module
Adds reply, edit, delete, etc. links, depending on user permissions.
drupal_get_js in drupal/core/includes/common.inc
Returns a themed presentation of all JavaScript code for the current page.
drupal_prepare_form in drupal/core/includes/form.inc
Prepares a structured form array.
drupal_process_form in drupal/core/includes/form.inc
Processes a form submission.

... See full list

File

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

Code

function drupal_get_token($value = '') {
  return drupal_hmac_base64($value, session_id() . drupal_get_private_key() . drupal_get_hash_salt());
}