| Versions | |
|---|---|
| 4.7 – 7 | drupal_get_token($value = '') |
Generate a token based on $value, the current user session and private key.
$value An additional value to base the token on
includes/
<?php
function drupal_get_token($value = '') {
$private_key = drupal_get_private_key();
return md5(session_id() . $value . $private_key);
}
?>