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

the filesystem has to be initialized once we know the user
This commit is contained in:
Thomas Müller 2013-11-08 14:25:08 -08:00
commit deafac9273
1 changed files with 8 additions and 0 deletions

View File

@ -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();
}