perf: Return cached password hash

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2024-06-27 16:58:06 -07:00
parent d65f53184e
commit dba00560d2

View file

@ -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)