Skip to content

Commit

Permalink
Merge pull request #5692 from nextcloud/backport/3703/stable24
Browse files Browse the repository at this point in the history
[stable24] Fix bug when session not found
  • Loading branch information
juliusknorr authored Apr 23, 2024
2 parents 78847cf + 1976dd2 commit 7391100
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions lib/Controller/SessionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ public function sync(int $documentId, int $sessionId, string $sessionToken, int

private function loginSessionUser(int $documentId, int $sessionId, string $sessionToken) {
$currentSession = $this->sessionService->getSession($documentId, $sessionId, $sessionToken);
$user = $this->userManager->get($currentSession->getUserId());
if ($user !== null) {
$this->userSession->setUser($user);
if ($currentSession !== false) {
$user = $this->userManager->get($currentSession->getUserId());
if ($user !== null) {
$this->userSession->setUser($user);
}
}
}
}

0 comments on commit 7391100

Please sign in to comment.