mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fixes occ user:info when the user never logged in
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
34f425c150
commit
071ceff7e2
1 changed files with 5 additions and 1 deletions
|
|
@ -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'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue