Skip to content
Snippets Groups Projects
Commit deafac92 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #5763 from owncloud/fixing-sharing-ocs-api-master

the filesystem has to be initialized once we know the user
parents edcf1912 f93dcc5d
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment