Skip to content

Commit 3231b3f

Browse files
authored
Merge pull request #30886 from nextcloud/fix/fix-user-info-notfoundexception
Fixes occ user:info when the user never logged in
2 parents 363bf20 + 071ceff commit 3231b3f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/Command/User/Info.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9797
protected function getStorageInfo(IUser $user): array {
9898
\OC_Util::tearDownFS();
9999
\OC_Util::setupFS($user->getUID());
100-
$storage = \OC_Helper::getStorageInfo('/');
100+
try {
101+
$storage = \OC_Helper::getStorageInfo('/');
102+
} catch (\OCP\Files\NotFoundException $e) {
103+
return [];
104+
}
101105
return [
102106
'free' => $storage['free'],
103107
'used' => $storage['used'],

0 commit comments

Comments
 (0)