diff options
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index da705863078..3299792e20d 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -255,7 +255,11 @@ class Server extends SimpleContainer implements IServerContainer { * @return \OCP\Files\Folder */ function getUserFolder() { - $dir = '/' . \OCP\User::getUser(); + $user = $this->getUserSession()->getUser(); + if (!$user) { + return null; + } + $dir = '/' . $user->getUID(); $root = $this->getRootFolder(); $folder = null; |