diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-05-17 15:30:36 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-05-17 15:30:36 +0200 |
commit | c6f770ea59e0a0f38f1baa5b52b87b20a83b50fd (patch) | |
tree | ce4a3e6318d58c3442929f2f0f3622795138d738 /lib/private/Accounts/AccountManager.php | |
parent | 703d716a32e08d0bc594ba5572452044c5fb3022 (diff) | |
download | nextcloud-server-c6f770ea59e0a0f38f1baa5b52b87b20a83b50fd.tar.gz nextcloud-server-c6f770ea59e0a0f38f1baa5b52b87b20a83b50fd.zip |
Create account structure also for empty record
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/Accounts/AccountManager.php')
-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); } |