[Solar-talk] Confused, JustALittle!
Kilbride, James P.
James.Kilbride at gd-ais.com
Wed May 7 11:29:30 CDT 2008
// get the dependency object of class Solar_Sql
$obj = Solar::dependency('Solar_Sql', $this->_config['sql']);
// get a selection tool using the dependency object
$select = Solar::factory($this->_config['model'],$obj);
// salt and hash the password
$hash = hash(
$this->_config['hash_algo'],
$this->_config['salt'] . $this->_passwd
);
//needs to add the where information from the config to this.
$selectConfiguration = array('where' =>
array("{$this->_config['handle_col']} = ?" => $this->_handle,
"{$this->_config['passwd_col']} = ?" => $hash,
),
);
$rows = $select->fetchAll($selectConfiguration);
// if we get back exactly 1 row, the user is authenticated;
// otherwise, it's more or less than exactly 1 row.
print_r($rows);
Here's my tasty code. There is only a single row in the database.. only
1.. yet i'm getting two rows.
What I'm doing is adapting an auth controller that instead of a table
uses a model for the user table. I just kind of like it as a neat way to
handle things. But it's not behaving. The fetchAll is returning 2
records back. There is nothing different between them so I'm just
baffled. What am I missing that is patently obvious?
James Kilbride
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080507/6841cbc9/attachment.html
More information about the Solar-talk
mailing list