replace session implementation if it changes at runtime

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2016-11-19 16:33:19 +01:00 committed by Roeland Jago Douma
parent 730442cd8f
commit 46adb3eced
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 11 additions and 1 deletions

View File

@ -56,6 +56,15 @@ class Store implements IStore {
$this->logger = $logger;
}
/**
* Replace the session implementation
*
* @param ISession $session
*/
public function setSession(ISession $session) {
$this->session = $session;
}
/**
* @since 9.2
*

View File

@ -1004,7 +1004,8 @@ class Server extends ServerContainer implements IServerContainer {
*/
public function setSession(\OCP\ISession $session) {
$this->query(SessionStorage::class)->setSession($session);
return $this->query('UserSession')->setSession($session);
$this->query('UserSession')->setSession($session);
$this->query(Store::class)->setSession($session);
}
/**