function simplenews_generate_hash in Simplenews 7
Same name and namespace in other branches
- 8.2 simplenews.module \simplenews_generate_hash()
- 8 simplenews.module \simplenews_generate_hash()
- 7.2 simplenews.module \simplenews_generate_hash()
- 3.x simplenews.module \simplenews_generate_hash()
Generate the hash key used for subscribe/unsubscribe link.
4 calls to simplenews_generate_hash()
- SimplenewsSourceTestCase::testSendCaching in tests/
simplenews.test - Test sending a newsletter to 100 recipients with caching enabled.
- SimplenewsSubscribeTestCase::testSubscribeAnonymous in tests/
simplenews.test - testSubscribeAnonymous
- SimplenewsSubscribeTestCase::testSubscribeMultiple in tests/
simplenews.test - Subscribe to multiple newsletters at the same time.
- simplenews_tokens in ./
simplenews.tokens.inc - Implements hook_tokens().
File
- ./
simplenews.module, line 2141 - 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;
}