Browse Source

no guest access

2.x
Paul Pound 1 year ago
parent
commit
0b52c19cd3
  1. 2
      modules/roblib_search_eds/src/Controller/RoblibSearchEdsController.php
  2. 2
      modules/roblib_search_eds/src/Lib/EBSCOConnector.php

2
modules/roblib_search_eds/src/Controller/RoblibSearchEdsController.php

@ -63,7 +63,7 @@ class RoblibSearchEdsController extends ControllerBase {
$search = array('lookfor' => $query, 'type' => 'ALLFields', 'index' => 'AllFields', 'q' => 'ebsco/results', 'op' => 'Search');
$eds_api = new EBSCOAPI($eds_config);
$is_local_ip = $eds_api->connector()->isGuestIPAddress($_SERVER["REMOTE_ADDR"]);
$eds_api->isGuest(!$is_local_ip);
$eds_api->isGuest(FALSE);
$output = $eds_api->apiSearch($search, $filters, 1, $number_per_page);
$output['is_local_ip'] = $is_local_ip;

2
modules/roblib_search_eds/src/Lib/EBSCOConnector.php

@ -214,7 +214,7 @@ class EBSCOConnector {
$this->autoComplete = $config['autocomplete'];
$this->orgId = $config['organization'];
$this->local_ip_address = $config['local_ip_address'];
$this->isGuest = (\Drupal::currentUser()->isAuthenticated() || $this->isGuestIPAddress($_SERVER["REMOTE_ADDR"])) ? 'n' : 'y';
$this->isGuest = 'n';
$this->logAPIRequests = ($config['log'] == 1);
}

Loading…
Cancel
Save