diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-04-05 17:12:52 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-04-05 17:12:52 +0200 |
commit | eb4d7fba20f4c1857816188c2aa09bb67eff6429 (patch) | |
tree | 1265471813dd3324276c6dcb65b6b6e0c0d8a94b /apps/provisioning_api | |
parent | 348171f311adb2758ad4c4de98d151569bec2d7a (diff) | |
download | nextcloud-server-eb4d7fba20f4c1857816188c2aa09bb67eff6429.tar.gz nextcloud-server-eb4d7fba20f4c1857816188c2aa09bb67eff6429.zip |
Rebase to master
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/AUserData.php | 11 |
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; } |