You are here

function simplenews_generate_hash in Simplenews 7.2

Same name and namespace in other branches
  1. 8.2 simplenews.module \simplenews_generate_hash()
  2. 8 simplenews.module \simplenews_generate_hash()
  3. 7 simplenews.module \simplenews_generate_hash()
  4. 3.x simplenews.module \simplenews_generate_hash()

Generates the hash key used for subscribe/unsubscribe link.

7 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_confirm_combined in includes/simplenews.subscription.inc
Menu callback: confirm a combined confirmation request.
simplenews_confirm_subscription in includes/simplenews.subscription.inc
Menu callback: confirm the user's (un)subscription request

... See full list

File

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

Code

function simplenews_generate_hash($mail, $action = '', $timestamp = REQUEST_TIME) {
  $data = $mail . drupal_get_private_key() . $action . $timestamp;
  return drupal_hash_base64($data);
}