You are here

function oa_sitemap_option_callback in Open Atrium Sitemap 7.2

Ajax Callback for saving Show Help to user session

Parameters

$value:

1 string reference to 'oa_sitemap_option_callback'
oa_sitemap_menu in ./oa_sitemap.module
Implements hook_menu().

File

./oa_sitemap.module, line 195

Code

function oa_sitemap_option_callback($value) {
  global $user;
  if (empty($_REQUEST['token']) || !drupal_valid_token($_REQUEST['token'], 'sitemap-option')) {
    ajax_deliver(MENU_ACCESS_DENIED);
    return;
  }
  if ($user->uid == 0 && !drupal_session_started()) {
    return;
  }
  $_SESSION['oa_sitemap_option'] = $value;
  return TRUE;
}