diff --git a/module/finc/src/finc/ILS/Driver/FincILS.php b/module/finc/src/finc/ILS/Driver/FincILS.php index 3b0af8362e9f8c90b1418e76bdce3a0f6acff116..7a3cdb66a60b9a5c21b4479cd4d4b8d5c5695dc1 100644 --- a/module/finc/src/finc/ILS/Driver/FincILS.php +++ b/module/finc/src/finc/ILS/Driver/FincILS.php @@ -233,7 +233,7 @@ class FincILS extends PAIA implements LoggerAwareInterface // if we already have a session with access_token and patron id, try to get // patron info with session data - if (isset($this->session->expires) && microtime() < $this->session->expires) { + if (isset($this->session->expires) && $this->session->expires > time()) { try { return $enrichUserDetails( $this->paiaGetUserDetails(($this->session->patron === 'root' ? $username : $this->session->patron)), diff --git a/module/finc/src/finc/ILS/Driver/PAIA.php b/module/finc/src/finc/ILS/Driver/PAIA.php index eb43c382e167b5e16d68dc21bf1254647713e1c1..29b4aafe98db67f28b944542e3cca72b7acd2ef4 100644 --- a/module/finc/src/finc/ILS/Driver/PAIA.php +++ b/module/finc/src/finc/ILS/Driver/PAIA.php @@ -608,9 +608,7 @@ class PAIA extends DAIA implements // if we already have a session with access_token and patron id, try to get // patron info with session data - if (isset($this->session->expires) - && microtime() < $this->session->expires - ) { + if (isset($this->session->expires) && $this->session->expires > time()) { try { return $enrichUserDetails( $this->paiaGetUserDetails($this->session->patron), @@ -1295,8 +1293,8 @@ class PAIA extends DAIA implements = isset($responseArray['scope']) ? explode(' ', $responseArray['scope']) : null; $this->session->expires - = isset($responseArray['expires']) - ? (microtime() + ($responseArray['expires']*1000)) : null; + = isset($responseArray['expires_in']) + ? (time() + ($responseArray['expires_in'])) : null; return true; }