Rebase to master

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-04-05 17:12:52 +02:00
parent 348171f311
commit eb4d7fba20
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
1 changed files with 10 additions and 1 deletions

View File

@ -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;
}