aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Accounts/AccountManager.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php
index 60065272a58..e3068a7ff25 100644
--- a/lib/private/Accounts/AccountManager.php
+++ b/lib/private/Accounts/AccountManager.php
@@ -795,8 +795,9 @@ class AccountManager implements IAccountManager {
}
public function getAccount(IUser $user): IAccount {
- if ($this->internalCache->hasKey($user->getUID())) {
- return $this->internalCache->get($user->getUID());
+ $cached = $this->internalCache->get($user->getUID());
+ if ($cached !== null) {
+ return $cached;
}
$account = $this->parseAccountData($user, $this->getUser($user));
$this->internalCache->set($user->getUID(), $account);