We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 348171f commit eb4d7fbCopy full SHA for eb4d7fb
1 file changed
apps/provisioning_api/lib/Controller/AUserData.php
@@ -169,7 +169,16 @@ protected function fillStorageInfo(string $userId): array {
169
'quota' => $storage['quota'],
170
];
171
} catch (NotFoundException $ex) {
172
- $data = [];
+ // User fs is not setup yet
173
+ $user = $this->userManager->get($userId);
174
+ if ($user === null) {
175
+ throw new OCSException('User does not exist', 101);
176
+ }
177
+ $quota = OC_Helper::computerFileSize($user->getQuota());
178
+ $data = [
179
+ 'quota' => $quota ? $quota : 'none',
180
+ 'used' => 0
181
+ ];
182
}
183
return $data;
184
0 commit comments