diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-01 10:43:01 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-02 19:20:37 +0100 |
commit | 964ebed86cb2ea4b91042f393d372bf74d0d1a03 (patch) | |
tree | 824422af35385826ae35725d3d8119281c5b16b6 /lib/private | |
parent | b2501dbf9a6e76d794fdaad9b18a7e638e9650ca (diff) | |
download | nextcloud-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')
-rw-r--r-- | lib/private/AppFramework/DependencyInjection/DIContainer.php | 2 | ||||
-rw-r--r-- | lib/private/Server.php | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index f865bd123bf..b005978c2b6 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -125,8 +125,6 @@ class DIContainer extends SimpleContainer implements IAppContainer { return new OC\AppFramework\Logger($this->server->query(ILogger::class), $c->query('AppName')); }); - $this->registerAlias(\OC\User\Session::class, \OCP\IUserSession::class); - $this->registerService(IServerContainer::class, function ($c) { return $this->getServer(); }); 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); |