Skip to content

Commit eb4d7fb

Browse files
committed
Rebase to master
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent 348171f commit eb4d7fb

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

apps/provisioning_api/lib/Controller/AUserData.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,16 @@ protected function fillStorageInfo(string $userId): array {
169169
'quota' => $storage['quota'],
170170
];
171171
} catch (NotFoundException $ex) {
172-
$data = [];
172+
// 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+
];
173182
}
174183
return $data;
175184
}

0 commit comments

Comments
 (0)