diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-05-21 10:47:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 10:47:19 +0300 |
commit | 1c1b349473e35c6335776e73f7b8fa7838fd9492 (patch) | |
tree | 97a7e5dfaa0f980a1c56e191b59b7ac7ce23e2a0 /lib | |
parent | d870e9ece5898050f88bc678c8c445cd435b6cc8 (diff) | |
parent | c6f770ea59e0a0f38f1baa5b52b87b20a83b50fd (diff) |
Merge pull request #21018 from nextcloud/bug/20498/add-defaults-on-empty
Create account structure also for empty record
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 8b0cb972c59..7b99fb0a410 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -148,7 +148,7 @@ class AccountManager implements IAccountManager { $userDataArray = json_decode($result[0]['data'], true); $jsonError = json_last_error(); - if ($userDataArray === null || $jsonError !== JSON_ERROR_NONE) { + if ($userDataArray === null || $userDataArray === [] || $jsonError !== JSON_ERROR_NONE) { $this->logger->critical("User data of $uid contained invalid JSON (error $jsonError), hence falling back to a default user record"); return $this->buildDefaultUserRecord($user); } |