if (list($uid, $password) = $res->fetchOneRow()) {
require_once('secure_hash.inc.php');
$expected_response = hash_encrypt("$uname:$password:".S::v('challenge'));
if (list($uid, $password) = $res->fetchOneRow()) {
require_once('secure_hash.inc.php');
$expected_response = hash_encrypt("$uname:$password:".S::v('challenge'));