Hi

a feature request here. Is it possible to implement an option for the user to have a checkbox that says: "don't send me emails from subscribed things" This would be great if i want to use a default subscription of nodes where the user have to opt out of every single node.

thanks
tom

Comments

brunodbo’s picture

Issue summary: View changes

I implemented this using a user flag, which I use to unset the default email notifier in hook_message_subscribe_get_subscribers_alter().

function my_module_message_subscribe_get_subscribers_alter(&$uids, $values) {
  $flag = flag_get_flag('user_flag_name');
  foreach ($uids as $key => $uid) {
    if ($flag && !$flag->is_flagged($key)) {
      unset($uids[$key]['notifiers']['email']);
    }
  }
}
bluegeek9’s picture

Status: Active » Closed (outdated)