function simplenews_generate_hash in Simplenews 7.2
Same name and namespace in other branches
- 8.2 simplenews.module \simplenews_generate_hash()
- 8 simplenews.module \simplenews_generate_hash()
- 7 simplenews.module \simplenews_generate_hash()
- 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
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);
}