From: Chuck Hagenbuch Date: Wed, 2 Jun 2010 21:08:16 +0000 (-0400) Subject: Fix parse error and bad variable that prevented Sql auth from working X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6a089a7214ec2f1b2ca36f73c5c5faba82e512d9;p=horde.git Fix parse error and bad variable that prevented Sql auth from working --- diff --git a/framework/Auth/lib/Horde/Auth/Sql.php b/framework/Auth/lib/Horde/Auth/Sql.php index a228cc122..12f551cb4 100644 --- a/framework/Auth/lib/Horde/Auth/Sql.php +++ b/framework/Auth/lib/Horde/Auth/Sql.php @@ -113,12 +113,12 @@ class Horde_Auth_Sql extends Horde_Auth_Base $values = array($userId); try { - $result = $this->_db->selectOne($query, $values); + $row = $this->_db->selectOne($query, $values); } catch (Horde_Db_Exception $e) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_FAILED); } - if (!$result || + if (!$row || !$this->_comparePasswords($row[$this->_params['password_field']], $credentials['password'])) { throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); } @@ -218,7 +218,7 @@ class Horde_Auth_Sql extends Horde_Auth_Base } } - $query = .= sprintf('WHERE %s = ?', $this->_params['username_field']); + $query .= sprintf('WHERE %s = ?', $this->_params['username_field']); $values[] = $oldID; try {