aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User/Session.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/User/Session.php')
-rw-r--r--lib/private/User/Session.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index dff3cefd0b9..c5a00aedcc6 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -183,6 +183,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