Seems that does not exist any configuration form in order to set this variable or i am missing something ?

Related function:

/**
 * Implements hook_flag().
 *
 * When flagging subscription flags, check if user wants email notifications
 * and flag the user for emails accordingly.
 */
function message_subscribe_email_flag($action, $flag, $content_id, $account) {
  $prefix = variable_get('message_subscribe_flag_prefix', 'subscribe') . '_';
  if (strpos($flag->name, $prefix) === 0) {
    // The flag is a subscription flag.
    $wrapper = entity_metadata_wrapper('user', $account);
    if ($wrapper->message_subscribe_email->value() || $action == 'unflag') {
      // User wants to use email for the subscription.
      // Flag or unflag user for emailing according to action taken.
      $name = str_replace($prefix, '', $flag->name);
      flag($action, 'email_' . $name, $content_id, $account);
    }
  }
}

Comments

paolomainardi’s picture

Seems to be something related to "commons_notify" features.

Can you confirm this ?

  // Exported field_instance: 'user-user-message_subscribe_email'
  $field_instances['user-user-message_subscribe_email'] = array(
    'bundle' => 'user',
    'default_value' => array(
      0 => array(
        'value' => 1,
      ),
    ),
    'deleted' => '0',
    'description' => 'Email option will be checked automatically when subscribing to something.',
    'display' => array(
      'default' => array(
        'label' => 'above',
        'module' => 'list',
        'settings' => array(),
        'type' => 'list_default',
        'weight' => 9,
      ),
    ),
    'display_label' => 1,
    'entity_type' => 'user',
    'field_name' => 'message_subscribe_email',
    'label' => 'Email subscriptions',
    'required' => FALSE,
    'settings' => array(
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'module' => 'options',
      'settings' => array(
        'display_label' => 0,
      ),
      'type' => 'options_onoff',
      'weight' => 0,
    ),
  );

paolomainardi’s picture

Up

amitaibu’s picture

Category: bug » support
Status: Active » Fixed

That field is added in message_subscribe_email_install()

paolomainardi’s picture

You're right, my fault, sorry.

Thanks a lot Amitaibu!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sysopx0’s picture

Issue summary: View changes

amitaibu - I installed the module and that field wasn't created. After that, Drupal crashes everytime when subscribing.

sysopx0’s picture

I suspect the error related to the inexistence of the message_subscribe_email field is caused by the fact that the list module is not registered as a prerequisite for the message_subscribe_email submodule. If the list module is enabled before that module is created then that field gets created in the user entity (as a boolean). Otherwise, it will give you an error, since that boolean sub-type only exists in the list module.