[Pkg-owncloud-commits] [owncloud] 12/61: Dont throw an error when calling $server->getUserFolder when logged out

David Prévot taffit at moszumanska.debian.org
Thu Jul 31 03:51:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 87ec3fbf1d2c3efc7427c0e178ffb09ae2aacaac
Author: Robin Appelman <icewind at owncloud.com>
Date:   Fri Jul 25 17:52:50 2014 +0200

    Dont throw an error when calling $server->getUserFolder when logged out
    
    Conflicts:
    	lib/private/server.php
---
 lib/private/server.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/private/server.php b/lib/private/server.php
index da70586..3299792 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;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list