summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index e3b7840cd3b..c8c00fa8592 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -909,7 +909,16 @@ class UsersController extends OCSController {
'quota' => $storage['quota'],
];
} catch (NotFoundException $ex) {
- $data = [];
+ // User fs is not setup yet
+ $user = $this->userManager->get($userId);
+ if ($user === null) {
+ throw new OCSException('User does not exist', 101);
+ }
+ $quota = OC_Helper::computerFileSize($user->getQuota());
+ $data = [
+ 'quota' => $quota ? $quota : 'none',
+ 'used' => 0
+ ];
}
return $data;
}