Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-12-06 14:10:50 +0300
committerJulius Härtl <jus@bitgrid.net>2019-12-06 17:02:50 +0300
commitd40f1b8437aa85b67f79063d63d0c65897a4d445 (patch)
tree200beeada5eb3c179e001503acc041131535fb95 /lib/Service/SessionService.php
parentd6d1badc1b89b929581fefcef534bf44bf0bd87c (diff)
Fix public share links
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/Service/SessionService.php')
-rw-r--r--lib/Service/SessionService.php5
1 files changed, 1 insertions, 4 deletions
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) {