PEAR is archived and read-only

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

Home » Authentication » Auth » Bug #7111

Auth doesn't reload DB field content if auth rechecked from session

Details

Submitted2006-03-13 19:19 UTC
Frommihamix at gmail dot com
StatusBogus
PackageAuth
PHP Version5.1.2
OSirrelevant
Roadmaps(Not assigned)

Comments

[2006-03-13 19:19 UTC] mihamix at gmail dot com

Description:
------------
I've created a page using HTTP 401 auth mechanism, and decided against to implement an own way, instead used Auth_HTTP package. During authentication, I fetch other fields from DB just to reload special datas (session-like datas stored in DB).
At first authentication, it loads the DB content into the session variable, and after at subsequent login checks it uses the data loaded into session instead of reloading the DB fields. I can't find anything written about this, so I don't really know if it's an intended behaviour or a side effect of the auth caching, but it's clear that this is pretty annoying.

May I ask you to change the behaviour or at least give a mechanism where I can setup Auth_HTTP to reload the fields from DB instead of using Session datas.

To make the situation more strange, the _same_ source works well with PHP 4.3.10 (I mean, w/ PHP 4.3.10 it reloads the DB contents).

It's possible that this report should go against the basic Auth package, since it seems to me that Auth.php provides the framework for all authentication methods.

[2007-01-02 01:04 UTC] aashley at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

This is the expected behaviour of the Auth system. Connections to the Auth_Container (in your case Auth_Container_DB) are only performed as required so as to minimise execution time.

[2007-01-02 08:13 UTC] mihamix at gmail dot com

If this is a case, could you please show me where is it documented, because I failed to find this behaviour mentioned in the documentation...