From b3106c321cea04947d15a21341f3700877a84a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 15 Jul 2014 17:41:44 +0200 Subject: [PATCH 1/2] use correct IUser in interface --- lib/public/iusersession.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/public/iusersession.php b/lib/public/iusersession.php index e9d417c1ac..db4abe150d 100644 --- a/lib/public/iusersession.php +++ b/lib/public/iusersession.php @@ -52,14 +52,14 @@ interface IUserSession { /** * set the currently active user * - * @param \OCP\User|null $user + * @param \OCP\IUser|null $user */ public function setUser($user); /** * get the current active user * - * @return \OCP\User + * @return \OCP\IUser */ public function getUser(); } From 818929274de5182a9cd289f503329df05bb4b16a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 15 Jul 2014 17:42:17 +0200 Subject: [PATCH 2/2] use UserSession service to resolve user id --- lib/private/server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/server.php b/lib/private/server.php index da70586307..3237ce30cc 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -255,7 +255,7 @@ class Server extends SimpleContainer implements IServerContainer { * @return \OCP\Files\Folder */ function getUserFolder() { - $dir = '/' . \OCP\User::getUser(); + $dir = '/' . $this->getUserSession()->getUser()->getUID(); $root = $this->getRootFolder(); $folder = null;