diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-01-27 18:33:24 +0300 |
---|---|---|
committer | Louis (Rebase PR Action) <artonge@users.noreply.github.com> | 2022-01-31 13:26:20 +0300 |
commit | 19324e6342c2263e3145ad39952f0f6e2417597c (patch) | |
tree | 8dfcb5369ae3d31696bbc1d4381f7a8c3de145db | |
parent | 094c10a6e5dd5fe85a150ea2d2867d08de2cdf95 (diff) |
Fixes occ user:info when the user never logged in
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | core/Command/User/Info.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Command/User/Info.php b/core/Command/User/Info.php index abc8938ed54..36bfa0b6d5b 100644 --- a/core/Command/User/Info.php +++ b/core/Command/User/Info.php @@ -97,7 +97,11 @@ class Info extends Base { protected function getStorageInfo(IUser $user): array { \OC_Util::tearDownFS(); \OC_Util::setupFS($user->getUID()); - $storage = \OC_Helper::getStorageInfo('/'); + try { + $storage = \OC_Helper::getStorageInfo('/'); + } catch (\OCP\Files\NotFoundException $e) { + return []; + } return [ 'free' => $storage['free'], 'used' => $storage['used'], |