You are here

function notifications_ui_access_page in Notifications 6

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

Menu access callback: account pages

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

File

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

Code

function notifications_ui_access_page($type, $account) {

  // Global user permissions
  if (notifications_access_user($account) && notifications_ui_subscription_type($type) && notifications_ui_user_options('page')) {

    // Check specifics for this subscription type
    $access = notifications_subscription_types($type, 'access');
    return $access ? user_access($access, $account) : TRUE;
  }
}