function drupal_get_token

7.x drupal_get_token($value = '')

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


$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 hash salt provided from drupal_get_hash_salt(), and the 'drupal_private_key' configuration variable.

See also


14 calls to drupal_get_token()
aggregator_view in drupal/modules/aggregator/
Displays the aggregator administration page.
batch_load in drupal/includes/
Loads a batch from the database.
batch_process in drupal/includes/
Processes the batch.
comment_links in drupal/modules/comment/comment.module
Helper function, build links for an individual comment.
dashboard_admin in drupal/modules/dashboard/dashboard.module
Page callback: Displays the dashboard.

... See full list


drupal/includes/, line 5064
Common functions that many Drupal modules will need to reference.


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