summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-11-08 14:25:08 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-11-08 14:25:08 -0800
commitdeafac92737a73c6cf5ec841b8aee8556e378459 (patch)
treed2567ca12fe86b0da3d192b3e8af05fea6f71655
parentedcf1912b93aa22b49bcf727285b8d84998537bc (diff)
parentf93dcc5d77ca3f27e4b40903ac602fdc787521d9 (diff)
downloadnextcloud-server-deafac92737a73c6cf5ec841b8aee8556e378459.tar.gz
nextcloud-server-deafac92737a73c6cf5ec841b8aee8556e378459.zip
Merge pull request #5763 from owncloud/fixing-sharing-ocs-api-master
the filesystem has to be initialized once we know the user
-rw-r--r--lib/private/api.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/api.php b/lib/private/api.php
index 7e69a6a77d2..eac4a825e07 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -245,6 +245,10 @@ class OC_API {
$return = OC_User::login($authUser, $authPw);
if ($return === true) {
self::$logoutRequired = true;
+
+ // initialize the user's filesystem
+ \OC_Util::setUpFS(\OC_User::getUser());
+
return $authUser;
}
@@ -252,6 +256,10 @@ class OC_API {
$loggedIn = OC_User::isLoggedIn();
$ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false;
if ($loggedIn === true && $ocsApiRequest) {
+
+ // initialize the user's filesystem
+ \OC_Util::setUpFS(\OC_User::getUser());
+
return OC_User::getUser();
}