diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/SessionService.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php index 368b07ba0..9b7dfbd22 100644 --- a/lib/Service/SessionService.php +++ b/lib/Service/SessionService.php @@ -111,6 +111,9 @@ class SessionService { return $this->sessionMapper->deleteInactive($documentId); } + /** + * @return bool|Session + */ public function getSession($documentId, $sessionId, $token) { if ($this->session !== null) { return $this->session; @@ -123,10 +126,9 @@ class SessionService { } } - public function isValidSession($documentId, $sessionId, $token) { - try { - $session = $this->getSession($documentId, $sessionId, $token); - } catch (DoesNotExistException $e) { + public function isValidSession($documentId, $sessionId, $token): bool { + $session = $this->getSession($documentId, $sessionId, $token); + if ($session === false) { return false; } // TODO: move to cache |