You are here

function notifications_ui_access_user_add in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()
  2. 6 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()
  3. 6.2 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()
  4. 6.3 notifications_ui/notifications_ui.module \notifications_ui_access_user_add()

Menu access callback: add subscription

1 call to notifications_ui_access_user_add()
NotificationsContentTests::testNotificationsUserPages in tests/notifications_content.test
Check all user pages before and after enabling permissions
1 string reference to 'notifications_ui_access_user_add'
notifications_ui_menu in notifications_ui/notifications_ui.module
Implementation of hook_menu()

File

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

Code

function notifications_ui_access_user_add($type = NULL) {
  $account = $GLOBALS['user'];
  if ($type) {
    return notifications_subscription($type)
      ->user_access($account, 'subscribe');
  }
  else {

    // Overview page, visible if user has access to some subscription types
    return (bool) notifications_subscription_user_types($account);
  }
}