You are here

function _simplenews_generate_hash in Simplenews 5

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

Helper function to generate the hash key used for subscribe/unsubscribe link in e-mail footer.

2 calls to _simplenews_generate_hash()
simplenews_mail_confirm in ./simplenews.module
Send confirmation email
_simplenews_send in ./simplenews.module
Send the newsletter

File

./simplenews.module, line 2750

Code

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