function simplenews_confirmation_add_combined in Simplenews 7.2
Same name and namespace in other branches
- 7 simplenews.module \simplenews_confirmation_add_combined()
Add a mail confirmation or fetch them.
Parameters
$action: (Optional) The confirmation type, either subscribe or unsubscribe.
$subscriber: (Optional) The subscriber object.
$newsletter: (Optional) The newsletter object.
Return value
If no arguments are passed in, an array of current confirmations, keyed by subscriber id, the value is an array with the keys action and newsletter_id.
2 calls to simplenews_confirmation_add_combined()
- simplenews_confirmation_send in ./
simplenews.module - Send a confirmation mail.
- simplenews_confirmation_send_combined in ./
simplenews.module - Send collected confirmations.
File
- ./
simplenews.module, line 3000 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_confirmation_add_combined($action = NULL, $subscriber = NULL, $newsletter = NULL) {
$group =& drupal_static(__FUNCTION__, array());
if (!empty($action)) {
$group[$subscriber->mail][$newsletter->newsletter_id] = $action;
}
else {
return $group;
}
}