You are here

function notifications_account_tab_access in Notifications 7

Menu access callback for user subscription tabs

3 calls to notifications_account_tab_access()
notifications_content_user_access in notifications_content/notifications_content.module
Check access to user account tab
notifications_tags_user_access in notifications_tags/notifications_tags.module
Check access to user account tab
notifications_user_account_access in notifications_user/notifications_user.module
Check access to user account tab

File

notifications_account/notifications_account.module, line 113
Notifications module - User subscriptions tabs

Code

function notifications_account_tab_access($account, $type) {
  if (user_access('administer notifications') || user_access('manage all subscriptions')) {
    return TRUE;
  }
  else {
    return $account->uid && $GLOBALS['user']->uid == $account->uid && user_access('maintain own subscriptions') && notifications_subscription($type)
      ->user_access($account);
  }
}