pdo = $pdo; $this->tableName = $tableName; } /** * Returns the digest hash for a user. * * @param string $realm * @param string $username * @return string|null */ public function getDigestHash($realm,$username) { $stmt = $this->pdo->prepare('SELECT username, digesta1 FROM `'.$this->tableName.'` WHERE username = ?'); $stmt->execute(array($username)); $result = $stmt->fetchAll(); if (!count($result)) return; return $result[0]['digesta1']; } }