Skip to content

Commit

Permalink
replace session implementation if it changes at runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Dec 19, 2016
1 parent 0d04859 commit bbb5eaa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/private/Authentication/LoginCredentials/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ public function __construct(ISession $session, IProvider $tokenProvider, ILogger
$this->logger = $logger;
}

/**
* Replace the session implementation
*
* @param ISession $session
*/
public function setSession(ISession $session) {
$this->session = $session;
}

/**
* @since 9.2
*
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,8 @@ public function getSession() {
*/
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);
}

/**
Expand Down

0 comments on commit bbb5eaa

Please sign in to comment.