You are here

function _simplenews_generate_hash in Simplenews 6.2

Same name and namespace in other branches
  1. 5 simplenews.module \_simplenews_generate_hash()
  2. 6 simplenews.module \_simplenews_generate_hash()

Generate the hash key used for subscribe/unsubscribe link.

1 call to _simplenews_generate_hash()
simplenews_token_values in ./simplenews.module
Implementation of hook_token_value().

File

./simplenews.module, line 2351
Simplenews node handling, sent email, newsletter block and general hooks

Code

function _simplenews_generate_hash($mail, $snid, $tid) {
  return drupal_substr(md5($mail . simplenews_private_key()), 0, 10) . $snid . 't' . $tid;
}