Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Catch Exceptions when loading storage data of users
This avoids having the whole userlist crashing because a user external
 storage fails to load. With this change only the problematic user
 storage/quota information will be empty.

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot-nextcloud[bot] committed Jan 16, 2023
commit eac6d9f36f08d1666cd7205726e4016a7d9268bd
10 changes: 10 additions & 0 deletions apps/provisioning_api/lib/Controller/AUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ protected function fillStorageInfo(string $userId): array {
self::USER_FIELD_QUOTA => $quota !== false ? $quota : 'none',
'used' => 0
];
} catch (\Exception $e) {
\OC::$server->get(\Psr\Log\LoggerInterface::class)->error(
"Could not load storage info for {user}",
[
'app' => 'provisioning_api',
'user' => $userId,
'exception' => $e,
]
);
return [];
}
return $data;
}
Expand Down