Skip to content

Commit

Permalink
chore: Switch to new API to set volatile user to prevent persisting i…
Browse files Browse the repository at this point in the history
…t in any case

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Jul 31, 2024
1 parent 0c5f19d commit fbabc88
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Service/UserScopeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ public function setUserScope(string $uid = null): void {
if ($user === null) {
throw new InvalidArgumentException('No user found for the uid ' . $uid);
}
$this->userSession->setUser($user);

if (method_exists($this->userSession, 'setVolatileActiveUser')) {
$this->userSession->setVolatileActiveUser($user);
} else {
$this->userSession->setUser($user);
}
}

/**
Expand Down

0 comments on commit fbabc88

Please sign in to comment.