Skip to content

Commit

Permalink
Merge pull request #3705 from nextcloud/backport/3703/stable25
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Jan 27, 2023
2 parents 1118c4a + 6640ad2 commit d8ba2ea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Controller/SessionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ public function mention(int $documentId, int $sessionId, string $sessionToken, s

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 d8ba2ea

Please sign in to comment.