the filesystem has to be initialized once we know the user

This commit is contained in:
Thomas Müller 2013-11-08 11:24:19 +01:00
parent 4459d964d6
commit f93dcc5d77
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();
}