diff options
-rw-r--r-- | lib/private/api.php | 8 |
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(); } |