diff --git a/targets/eds/includes/rest/EBSCOAPI.php b/targets/eds/includes/rest/EBSCOAPI.php index cdc5a6a..13f1c59 100755 --- a/targets/eds/includes/rest/EBSCOAPI.php +++ b/targets/eds/includes/rest/EBSCOAPI.php @@ -233,6 +233,7 @@ class EBSCOAPI { * @access public */ public function getSessionToken($authenToken, $invalid = 'n') { + $guest = variable_get('roblib_search_eds_guest','n'); $token = ''; // Check user's login status @@ -251,7 +252,7 @@ class EBSCOAPI { if (empty($profile)) { $profile = $_COOKIE['Guest']; } - $sessionToken = $this->apiSessionToken($authenToken, $profile, 'y'); + $sessionToken = $this->apiSessionToken($authenToken, $profile, $guest); $_SESSION['sessionToken'] = $sessionToken; } $token = $_SESSION['sessionToken']['sessionToken']; @@ -260,7 +261,7 @@ class EBSCOAPI { $profileId = $this->config['profile']; - $sessionToken = $this->apiSessionToken($authenToken, $profileId, 'y'); + $sessionToken = $this->apiSessionToken($authenToken, $profileId, $guest); $_SESSION['profile'] = $profileId; $_SESSION['sessionToken'] = $sessionToken; setcookie("Guest", $profileId, 0); diff --git a/targets/eds/roblib_search_eds.module b/targets/eds/roblib_search_eds.module index 01dbb8a..c6e7440 100644 --- a/targets/eds/roblib_search_eds.module +++ b/targets/eds/roblib_search_eds.module @@ -90,6 +90,14 @@ function roblib_search_eds_config_form($form, &$form_state) { '#required' => TRUE, ); + $form['roblib_search_eds_guest'] = array( + '#type' => 'textfield', + '#title' => t('EDS Guest access'), + '#default_value' => variable_get('roblib_search_eds_guest', 'y'), + '#description' => t('EDS Guest access, y = guest access, n = not a guest'), + '#required' => TRUE, + ); + $form['roblib_search_eds_profile'] = array( '#type' => 'textfield', '#title' => t('EDS profile'),