aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/User
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-01-27 16:33:24 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-01-27 16:33:24 +0100
commit071ceff7e2f1e410f5525a28b34bd90245f82f76 (patch)
treed9abbd3b53a93f73a40fb995f6bb752cf15f79ab /core/Command/User
parent34f425c1504a79ef81f400862232bbd6776f5f7a (diff)
downloadnextcloud-server-071ceff7e2f1e410f5525a28b34bd90245f82f76.tar.gz
nextcloud-server-071ceff7e2f1e410f5525a28b34bd90245f82f76.zip
Fixes occ user:info when the user never logged in
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/Command/User')
-rw-r--r--core/Command/User/Info.php6
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'],