From 592c04a9db83c27df8155ae97c6693fe2170e543 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= <jfd@butonic.de>
Date: Wed, 1 Feb 2017 10:49:07 +0100
Subject: [PATCH] cache loadUser if not exists

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
---
 lib/private/User/Database.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php
index 060953c3009..efa6672ccee 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -254,7 +254,7 @@ class Database extends Backend implements IUserBackend {
 
 			$this->cache[$uid] = false;
 
-			while ($row = $result->fetchRow()) {
+			if ($row = $result->fetchRow()) {
 				$this->cache[$uid]['uid'] = $row['uid'];
 				$this->cache[$uid]['displayname'] = $row['displayname'];
 			}
-- 
GitLab