Skip to content

Commit

Permalink
Merge pull request #3860 from nextcloud/backport/3833/stable29
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Aug 1, 2024
2 parents c5a41c8 + f9b2541 commit cce4ff2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Service/UserScopeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ public function setUserScope(?string $uid = null): void {
if ($user === null) {
throw new InvalidArgumentException('No user found for the uid ' . $uid);
}
$this->userSession->setUser($user);

/** @psalm-suppress RedundantCondition */
if (method_exists($this->userSession, 'setVolatileActiveUser')) {
$this->userSession->setVolatileActiveUser($user);
} else {
$this->userSession->setUser($user);
}
}

/**
Expand Down

0 comments on commit cce4ff2

Please sign in to comment.