From: Loki3000 Date: Mon, 9 Jan 2017 20:34:23 +0000 (+0300) Subject: Default value for null user X-Git-Tag: v12.0.0beta1~720^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=135198bf0dd091768428ac78b70d06d9c7190f27;p=nextcloud-server.git Default value for null user For guest users on every request executes query: SELECT `uid`, `displayname` FROM `users` WHERE LOWER(`uid`) = LOWER(null) as I see, uid can't be equal to null by design. --- diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 28cb3302858..69826f49be3 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -75,6 +75,7 @@ class Database extends Backend implements IUserBackend { */ public function __construct($eventDispatcher = null) { $this->cache = new CappedMemoryCache(); + $this->cache[null] = false; $this->eventDispatcher = $eventDispatcher ? $eventDispatcher : \OC::$server->getEventDispatcher(); }