mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 06:37:56 -04:00
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 <come.chilliet@nextcloud.com>
This commit is contained in:
parent
f74ba9cb5d
commit
eac6d9f36f
1 changed files with 10 additions and 0 deletions
|
|
@ -267,6 +267,16 @@ abstract class AUserData extends OCSController {
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue