function campaignmonitor_form_campaignmonitor_admin_settings_general_alter in Campaign Monitor 7
Implements hook_form_FORM_ID_alter().
Adds the option to synchronize subscriptions with user updates to the general settings form.
File
- modules/
campaignmonitor_user/ campaignmonitor_user.module, line 179 - Tab to the profile page to select newsletters to subscribe to.
Code
function campaignmonitor_form_campaignmonitor_admin_settings_general_alter(&$form, &$form_state, $form_id) {
$defaults = variable_get('campaignmonitor_general', []);
$form['campaignmonitor_general']['synchronize'] = [
'#type' => 'checkbox',
'#title' => t('Synchronize e-mail address when updating user account.'),
'#default_value' => isset($defaults['synchronize']) ? $defaults['synchronize'] : 0,
'#description' => t('If checked, user e-mail adresses will be synchronized when users update their account.'),
];
}