You are here

function notifications_access_subscribe in Notifications 6.4

Same name and namespace in other branches
  1. 6 notifications.module \notifications_access_subscribe()
  2. 6.2 notifications.module \notifications_access_subscribe()
  3. 6.3 notifications.module \notifications_access_subscribe()
  4. 7 notifications.module \notifications_access_subscribe()

Menu access callback for subscribe links

More access checking depending on subscription type will be done at the destination page

1 call to notifications_access_subscribe()
notifications_ui_user_access in notifications_ui/notifications_ui.module
Check user access to notifications_ui
1 string reference to 'notifications_access_subscribe'
notifications_menu in ./notifications.module
Implementation of hook_menu().

File

./notifications.module, line 319
Notifications module

Code

function notifications_access_subscribe($account) {
  global $user;
  if (!$account->uid && !$user->uid) {
    return notifications_access_anonymous();
  }
  if (user_access('administer notifications') || user_access('manage all subscriptions')) {
    return TRUE;
  }
  return $account && $account->uid && $user->uid == $account->uid && user_access('maintain own subscriptions');
}