Auth package bug or documentation issue?
| From: | Denis Gerasimov | Date: | Wed, 29 Sep 2004 08:26:58 +0000 |
| Subject: | Auth package bug or documentation issue? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-14678@lists.php.net to get a copy of this message | ||
Hello all,
I got a very strange behavior of getAuthData() method of Auth class.
I tried to follow the example given here:
http://pear.php.net/manual/en/package.authentication.auth-http.auth-http.exa
mple2.php but any kind of calls like $objAuth->getAuthData() or
$objAuth->getAuthData('id') etc. returned no result (null value or empty
array).
Then I dug a little in the sources and found that there is an error in the
example code, the line
'dbFields'=>"*", // enabling fetch for other db columns
have to be
'db_fields' => '*' // enabling fetch for other db columns
I changed this line but this didn't help me at all.
After some time spent I tried to insert this call before getAuthData():
$objAuth->storage->fetchData($objAuth->username, $objAuth->password);
and that resolved the problem. I am really not sure that this is the right
way; please, anybody explain me what goes on.
My configuration:
OS: Windows 2000 Professional SP4
Web server: Apache 2.0.50
PHP: PHP 5.0.1
Auth, Auth_HTTP, DB etc.: latest versions
Best regards, Denis Gerasimov
Outsourcing Services Manager,
VEKOS, Ltd.
www.vekos.ru