From d40f1b8437aa85b67f79063d63d0c65897a4d445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 6 Dec 2019 12:10:50 +0100 Subject: Fix public share links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/SessionService.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php index 81251e9da..368b07ba0 100644 --- a/lib/Service/SessionService.php +++ b/lib/Service/SessionService.php @@ -70,7 +70,7 @@ class SessionService { $session = new Session(); $session->setDocumentId($documentId); $userName = $this->userId ? $this->userId : $guestName; - $session->setUserId($userName); + $session->setUserId($this->userId); $session->setToken($this->secureRandom->generate(64)); $color = $this->avatarManager->getGuestAvatar($userName)->avatarBackgroundColor($userName); $color = sprintf("#%02x%02x%02x", $color->r, $color->g, $color->b); @@ -124,9 +124,6 @@ class SessionService { } public function isValidSession($documentId, $sessionId, $token) { - if ($this->userId) { - return true; - } try { $session = $this->getSession($documentId, $sessionId, $token); } catch (DoesNotExistException $e) { -- cgit v1.2.3