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.
This commit is contained in:
Loki3000 2017-01-09 23:34:23 +03:00 committed by GitHub
parent 307d45e3bd
commit 135198bf0d
1 changed files with 1 additions and 0 deletions

View File

@ -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();
}