Re: cvs: pear /Auth Auth.php Container.php /Auth/Container DB.php
| From: | Martin Jansen | Date: | Fri, 13 Jul 2001 12:56:53 +0000 |
| Subject: | Re: cvs: pear /Auth Auth.php Container.php /Auth/Container DB.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-271@lists.php.net to get a copy of this message | ||
On Fri, 13 Jul 2001 14:18:48 +0200, Tobias Nix wrote:
>should this line be added to refresh Auth lifetime ?
>
>/pear/auth/Auth.php
>function check_auth()
>--------------
>250: if
>($GLOBALS['HTTP_SESSION_VARS']['auth']['registered'] ==
>true &&
>251:
>$GLOBALS['HTTP_SESSION_VARS']['auth']['username'] != "")
>{
>+ 252:
>$GLOBALS['HTTP_SESSION_VARS']['auth']['timestamp'] =
>time();
>253: return true;
>254: }
>--------------
No: $GLOBALS['HTTP_SESSION_VARS']['auth']['timestamp'] defines the
time, when the user began the session (== he logged in). My
intention behind that was to give the programmer the ability to
set up a maximum time after which the user has to login again.
What you want is a maximum idle time: The user can be idle for n
seconds. If this n seconds are over without any activity from the
user (== no call of check_auth() for n seconds), the user has to
login again.
Did I understand you right?
I will think about adding this feature to PEAR::Auth, since
it might be really useful.
- Martin