You are here

function comment_notify_user_update in Comment Notify 7

File

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

Code

function comment_notify_user_update(&$edit, $account, $category) {
  if ($category != 'account') {
    return;
  }
  if (isset($edit['node_notify']) && isset($edit['comment_notify'])) {
    module_load_include('inc', 'comment_notify', 'comment_notify');

    // Save the values of node_notify_mailalert and comment_notify_mailalert
    // to {comment_notify_user_settings}.
    comment_notify_set_user_notification_setting($account->uid, $edit['node_notify'], $edit['comment_notify']);
  }

  // Unset them from $user so they don't also get saved into {users}.data.
  unset($edit['node_notify']);
  unset($edit['comment_notify']);
}