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:
commit
deafac9273
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue