Skip to content

Commit

Permalink
Merge pull request #3861 from nextcloud/backport/3833/stable28
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Aug 1, 2024
2 parents 53cba73 + b531f5d commit a1f5514
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 a1f5514

Please sign in to comment.