diff options
author | Julius Härtl <jus@bitgrid.net> | 2024-03-19 11:12:03 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2024-03-19 13:48:23 +0100 |
commit | e330efe5a04b69af935b4b779511b732c2a69e73 (patch) | |
tree | 68eb6c71382438202edf27d96e4c064d8c0df76b /lib/private/User | |
parent | 20dd80d2fd7bf2bb41dc4523dcb5d9b6b03b73ee (diff) | |
download | nextcloud-server-e330efe5a04b69af935b4b779511b732c2a69e73.tar.gz nextcloud-server-e330efe5a04b69af935b4b779511b732c2a69e73.zip |
fix: Implement option to temporarily set the user session
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/Session.php | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ -212,6 +212,15 @@ class Session implements IUserSession, Emitter { } /** + * 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 * * @return IUser|null Current user, otherwise null |