diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-08-31 09:49:19 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-08-31 13:42:41 +0200 |
commit | 4a4f52e7a4a720f24d6d9b5bab7fa7c49e71dce0 (patch) | |
tree | 1a09212568ac2d8cedf7a3aa7cd028026a9a52a7 /lib | |
parent | 8d786ec4567ece27edf960c625f5c350f4078d79 (diff) | |
download | nextcloud-server-4a4f52e7a4a720f24d6d9b5bab7fa7c49e71dce0.tar.gz nextcloud-server-4a4f52e7a4a720f24d6d9b5bab7fa7c49e71dce0.zip |
Add optional user ID parameter for getUseFolder
Conflicts:
lib/private/server.php
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/server.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 5847be9eed8..46036370116 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -209,10 +209,17 @@ class Server extends SimpleContainer implements IServerContainer { /** * Returns a view to ownCloud's files folder * + * @param string $userId user ID * @return \OCP\Files\Folder */ - function getUserFolder() { - $dir = '/' . \OCP\User::getUser(); + function getUserFolder($userId = null) { + if($userId === null) { + $userId = \OCP\User::getUser(); + if (!$userId) { + return null; + } + } + $dir = '/' . $userId; $root = $this->getRootFolder(); $folder = null; |