summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-11-01 10:43:01 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-11-02 19:20:37 +0100
commit964ebed86cb2ea4b91042f393d372bf74d0d1a03 (patch)
tree824422af35385826ae35725d3d8119281c5b16b6 /lib/private/Server.php
parentb2501dbf9a6e76d794fdaad9b18a7e638e9650ca (diff)
downloadnextcloud-server-964ebed86cb2ea4b91042f393d372bf74d0d1a03.tar.gz
nextcloud-server-964ebed86cb2ea4b91042f393d372bf74d0d1a03.zip
The UserSession is constructed in the server
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 204345708b9..eb1a9025ff3 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -361,7 +361,7 @@ class Server extends ServerContainer implements IServerContainer {
});
$this->registerAlias(IProvider::class, Authentication\Token\Manager::class);
- $this->registerService(\OCP\IUserSession::class, function (Server $c) {
+ $this->registerService(\OC\User\Session::class, function (Server $c) {
$manager = $c->getUserManager();
$session = new \OC\Session\Memory('');
$timeFactory = new TimeFactory();
@@ -430,7 +430,8 @@ class Server extends ServerContainer implements IServerContainer {
});
return $userSession;
});
- $this->registerAlias('UserSession', \OCP\IUserSession::class);
+ $this->registerAlias(\OCP\IUserSession::class, \OC\User\Session::class);
+ $this->registerAlias('UserSession', \OC\User\Session::class);
$this->registerAlias(\OCP\Authentication\TwoFactorAuth\IRegistry::class, \OC\Authentication\TwoFactorAuth\Registry::class);