You are here

function notifications_anonymous_subscription_page in Notifications 6.4

Page callback. Manage anonymous subscriptions.

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

File

notifications_anonymous/notifications_anonymous.pages.inc, line 81
Notifications for anonymous users

Code

function notifications_anonymous_subscription_page($subscription, $op = 'unsubscribe') {
  module_load_include('pages.inc', 'notifications');

  // Just for administrators or signed requests
  if (!user_access('administer notifications') && !notifications_check_signature()) {
    drupal_access_denied();
    exit(0);
  }
  switch ($op) {
    case 'unsubscribe':
      $output .= drupal_get_form('notifications_form_unsubscribe_confirm', $subscription);
      break;
    case 'edit':

      // After editing this subscription, forward to the same signed page
      $output .= drupal_get_form('notifications_anonymous_subscription_edit_form', $subscription);
      break;
  }
  return $output;
}