diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-06-27 16:58:06 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2024-07-08 16:30:52 -0700 |
commit | dba00560d201755fd1bd57a0a5bf6ee6704281ed (patch) | |
tree | 50a056ffff438a970d9620a7c2621183ce95a211 /lib/private/User | |
parent | d65f53184e696565c2f955dbf523d84388ead254 (diff) | |
download | nextcloud-server-dba00560d201755fd1bd57a0a5bf6ee6704281ed.tar.gz nextcloud-server-dba00560d201755fd1bd57a0a5bf6ee6704281ed.zip |
perf: Return cached password hash
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/Database.php | 3 |
1 files changed, 3 insertions, 0 deletions
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) |