diff options
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 11 |
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 cd277adb162..b1b110b5289 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -873,7 +873,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, + 'used' => 0 + ]; } return $data; } |