From e330efe5a04b69af935b4b779511b732c2a69e73 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 19 Mar 2024 11:12:03 +0100 Subject: fix: Implement option to temporarily set the user session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/User/Session.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/private/User') diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index f2c0010b6be..af2599e26b6 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -211,6 +211,15 @@ class Session implements IUserSession, Emitter { $this->activeUser = $user; } + /** + * Temporarily set the currently active user without persisting in the session + * + * @param IUser|null $user + */ + public function setVolatileActiveUser(?IUser $user): void { + $this->activeUser = $user; + } + /** * get the current active user * -- cgit v1.2.3