summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/provisioning_api/lib/Controller/AUserData.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php
index 2b209067cee..82ca98ced8c 100644
--- a/apps/provisioning_api/lib/Controller/AUserData.php
+++ b/apps/provisioning_api/lib/Controller/AUserData.php
@@ -169,7 +169,16 @@ abstract class AUserData 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;
}