Home » Authentication » Auth » Bug #7899
Auth::sessionValidThru() returns wrong value
Details
| Submitted | 2006-06-14 13:14 UTC |
|---|---|
| From | dm2029 at mail dot ru |
| Assigned | aashley |
| Status | Closed |
| Package | Auth |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-06-14 13:14 UTC] dm2029 at mail dot ru
Description:
------------
Package PEAR::Auth v. 1.3.0
Auth.php,v 1.101 2006/03/02 06:53:08
Documentation (http://pear.php.net/manual/en/package.authentication.auth.auth.sessionvalidthru.php) says that Auth::sessionValidThru() returns 0 if no maximum idle time is set.
But really it returns $this->session['idle'] if $this->idle is set to 0.
Test script:
---------------
<?php
require_once('Auth/Auth.php');
$login_params = array(
"dsn" => "mysql://user:pass@localhost/database",
"table" => "auth_table",
"usernamecol" => "Login",
"passwordcol" => "Password"
);
$Auth = new Auth('DB', $login_params);
$Auth->start();
if ($Auth->getAuth()) {
echo $Auth->sessionValidThru();
}
?>
Expected result:
----------------
0
Actual result:
--------------
Current $Auth->session['idle'] value (i.e. current Unix timestamp)
[2006-08-10 01:42 UTC] aashley at php dot net
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.