PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » Auth » Bug #2497

'db_fields' parameter has no effect

Details

Submitted2004-10-11 09:49 UTC
Fromdenis dot gerasimov at vekos dot ru
StatusBogus
PackageAuth
PHP Version5.0.1
OSMicrosoft Windows 2000 SP4
Roadmaps(Not assigned)

Comments

[2004-10-11 09:49 UTC] denis dot gerasimov at vekos dot ru

Description:
------------
'db_fields' parameter has no effect, only username/password are fetched from the database.
I have to run fetch command manually like this:
$objAuth->storage->fetchData($objAuth->username, $objAuth->password);

Reproduce code:
---------------
...

private static $arrAuthOptions = array(
'dsn' => 'mysql://user:pass@localhost/db',
'table' => 'editors',
'usernamecol' => 'login',
'passwordcol' => 'password',
'cryptType' => 'none',
// FIX
'db_fields' => '*' // fetch all table fields
);

...

$objAuth = new Auth_HTTP("DB", self::$arrAuthOptions);

...

if($objAuth->getAuth()) {

// FIX
$objAuth->storage->fetchData($objAuth->username, $objAuth->password);

if ($objAuth->getAuthData('id') != 0) {

...

Expected result:
----------------
That should not be done manually I suppose.

[2004-10-18 09:34 UTC] denis dot gerasimov at vekos dot ru

I have tested your script, thanks.

The problem is that I cannot reproduce this bug (after upgrading to PHP 5.0.2; that may be the reason but I am really not sure).

Your code and my script work fine now.
Possibly, that was my mistake, but... it really didn't work.

Well, I suggest to mark this bug Closed. If somebody see this strange behaviuor once more time the status will have to be changed back to Open again.