You are here

function notifications_ui_user in Notifications 6

Same name and namespace in other branches
  1. 6.4 notifications_ui/notifications_ui.module \notifications_ui_user()
  2. 6.2 notifications_ui/notifications_ui.module \notifications_ui_user()
  3. 6.3 notifications_ui/notifications_ui.module \notifications_ui_user()
  4. 7 notifications_ui/notifications_ui.module \notifications_ui_user()
3 string references to 'notifications_ui_user'
NotificationsContentTests::enableUIPages in tests/notifications_content.test
notifications_ui_uninstall in notifications_ui/notifications_ui.install
Implementation of hook_uninstall()
notifications_ui_user_options in notifications_ui/notifications_ui.module
Check enabled option / Get options for user account pages

File

notifications_ui/notifications_ui.module, line 585
User Interface for subscriptions modules

Code

function notifications_ui_user($op, &$edit, &$account, $category = NULL) {
  global $user;
  if ($op == 'view') {

    // Add plain links if enabled
    if (notifications_ui_account_options('links') && ($options = notifications_ui_subscribe_options($user, 'user', $account))) {
      $links = notifications_ui_build_links($options);
      $account->content['summary']['notifications'] = array(
        '#type' => 'user_profile_item',
        '#title' => t('Subscriptions'),
        '#value' => theme('links', $links, array(
          'class' => 'item-list',
        )),
      );
    }
  }
}