You are here

function notifications_anonymous_subscription_access in Notifications 6.4

Menu access callback for subscriptions

1 string reference to 'notifications_anonymous_subscription_access'
notifications_anonymous_menu in notifications_anonymous/notifications_anonymous.module
Implementation of hook_menu()

File

notifications_anonymous/notifications_anonymous.module, line 78
Notifications for anonymous users

Code

function notifications_anonymous_subscription_access($op = 'create', $subscription = NULL, $account = NULL) {
  global $user;
  if ((user_access('addminister notifications') || !$user->uid) && (!$account || !$account->uid)) {
    switch ($op) {
      case 'create':
        return (bool) notifications_anonymous_send_methods();
      case 'unsubscribe':
        return $subscription && !$subscription->uid;
    }
  }
}