You are here

function comment_notify_user in Comment Notify 5

Same name and namespace in other branches
  1. 5.2 comment_notify.module \comment_notify_user()
  2. 6 comment_notify.module \comment_notify_user()

Implementation of hook_user().

File

./comment_notify.module, line 229
This module provides comment follow-up e-mail notification for anonymous and registered users.

Code

function comment_notify_user($type, &$edit, &$user, $category = NULL) {
  switch ($type) {
    case 'form':
      if ($category == 'account') {
        $form = array();
        $form['comment_notify_settings'] = array(
          '#type' => 'fieldset',
          '#title' => t('Comment follow-up notification settings'),
          '#weight' => 4,
          '#collapsible' => TRUE,
        );
        $form['comment_notify_settings']['comment_notify_mailalert'] = array(
          '#type' => 'checkbox',
          '#title' => t('Receive comment follow-up notification e-mails'),
          '#default_value' => isset($edit['comment_notify_mailalert']) ? $edit['comment_notify_mailalert'] : 1,
          '#description' => t('Check this box to receive e-mail notification for follow-up comments to comments you posted. You can later disable this on a post-by-post basis... so if you leave this to YES, you can still disable follow-up notifications for comments you don\'t want follow-up mails anymore - i.e. for very popular posts.'),
        );
        return $form;
      }
      break;
  }
}