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 d6bfc98 commit 761fba3Copy full SHA for 761fba3
1 file changed
apps/provisioning_api/lib/Controller/UsersController.php
@@ -821,7 +821,16 @@ protected function fillStorageInfo(string $userId): array {
821
'quota' => $storage['quota'],
822
];
823
} catch (NotFoundException $ex) {
824
- $data = [];
+ // User fs is not setup yet
825
+ $user = $this->userManager->get($userId);
826
+ if ($user === null) {
827
+ throw new OCSException('User does not exist', 101);
828
+ }
829
+ $quota = OC_Helper::computerFileSize($user->getQuota());
830
+ $data = [
831
+ 'quota' => $quota,
832
+ 'used' => 0
833
+ ];
834
}
835
return $data;
836
0 commit comments