You are here

function rate_get_token in Rate 7

Generate a rate token

This function is very similar to drupal_get_token(). The reason not to use drupal_get_token() is that that function uses session_id(), which generates different session id's for each page request when not logged in.

Parameters

string $values:

Return value

string

2 calls to rate_get_token()
rate_generate_widget in ./rate.module
Generate a widget.
rate_vote_ahah in ./rate.module
AHAH callback for the vote buttons.

File

./rate.module, line 1456
Rate module

Code

function rate_get_token($value = '') {
  global $user;
  return drupal_hmac_base64($value, $user->uid . drupal_get_private_key() . drupal_get_hash_salt());
}