drupal_get_token

Versions
4.6 – 7
drupal_get_token($value = '')

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

Parameters

$value An additional value to base the token on.

▾ 9 functions call drupal_get_token()

batch_load in includes/batch.inc
Loads a batch from the database.
batch_process in includes/form.inc
Processes the batch.
dashboard_admin in modules/dashboard/dashboard.module
Dashboard page callback.
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.
drupal_process_form in includes/form.inc
Processes a form submission.
form_set_cache in includes/form.inc
Store a form in the cache.
shortcut_page_build in modules/shortcut/shortcut.module
Implement hook_page_build().
system_themes_page in modules/system/system.admin.inc
Menu callback; displays a listing of all themes.
update_info_page in ./update.php

Code

includes/common.inc, line 4461

<?php
function drupal_get_token($value = '') {
  $private_key = drupal_get_private_key();
  return md5(session_id() . $value . $private_key);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.