[Typo3] 2 simple(?) FE user questions

Bernhard Kraft kraftb at kraftb.at
Mon Nov 28 14:20:48 CET 2005


Eric Blom wrote:
>     1) If you login and then close your web browsing application  your
> session is no longer valid. Therefore, if you open you web  browser
> again and go to the site you have to log in again
>     2) If the web browsing application is left open and you login  there
> is a fixed number of seconds of inactivity before the session  expires.
>     3) The user has the option of selecting a checkbox when the  login
> that sets a cookie that will automatically start a new session  when the
> visit my site again even if the browser has been closed and  reopened.
> 
> To me a non zero lifetime setting in Typo3 accomplishes #3 only.
> 
> As you suggested Benhard it seems that the only way to accomplish all 
> three points above is with a core XCLASS extension.

I talked about such a case:

"Either being logged in until the browser closes OR the user had a specific
time of inactivity"

In my opinion this can't be achieved with a single cookie:

Cookie_lifetime == 0 ==> until browser session
cookie_lifetime > 0  ==> given time

and what you need is a combination of both ... so you would have to do something
like:

if (cookie_session_isOK($_COOKIES['fe-user-session-cookie'])&&cookie_time_isOK($_COOKIES['fe-user-time-cookie']))	{
	// Still logged in
} else	{
	// One of the cookies is invalid
}

I will do some investigation if this should be a core feature (you could enable it for example by setting
the FE[lifetime] to a negative value)


greets,
Bernhard



More information about the TYPO3-english mailing list