[TYPO3-dev] session handling

Dmitry Dulepov [typo3] dmitry at typo3.org
Mon Oct 29 12:27:23 CET 2007


Steffen Kamper wrote:
> i don't see the need for that too. It's two times really the same
> in start: $this->user = $this->fetchUserSession();
> in checkAuthentication: $this->user = $this->fetchUserSession();
> 
> should be $haveSession = is_array($this->user) ? TRUE : FALSE;  ?
> 
> It looks like that feature auto-login is loosing the session data, i don't 
> know really.
> Is auto-login a core feature or extension?

Core.

Complete piece of code from t3lib/class.t3lib_userauth.php with comments:

------------------------------------
// Check to see if anyone has submitted login-information and if so register the user with the session. $this->user[uid] may be used to write log...
$this->checkAuthentication();

// Make certain that NO user is set initially. ->check_authentication may have set a session-record which will provide us with a user record in the next section:
unset($this->user);

// re-read user session
$this->user = $this->fetchUserSession();
------------------------------------

So it is an intention to reread user session. Why? I always was puzzled about it.

-- 
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs




More information about the TYPO3-dev mailing list