From dba00560d201755fd1bd57a0a5bf6ee6704281ed Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Thu, 27 Jun 2024 16:58:06 -0700 Subject: [PATCH] perf: Return cached password hash Signed-off-by: Christopher Ng --- lib/private/User/Database.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 0a0231a7784..194e998ef4f 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -183,6 +183,9 @@ class Database extends ABackend implements if (!$this->userExists($userId)) { return null; } + if (!empty($this->cache[$userId]['password'])) { + return $this->cache[$userId]['password']; + } $qb = $this->dbConn->getQueryBuilder(); $qb->select('password') ->from($this->table) -- 2.39.5