/**
  * Initializes the front-end login user.
  *
  * @return	void
  */
 function initFEuser()
 {
     $this->fe_user = t3lib_div::makeInstance('tslib_feUserAuth');
     $this->fe_user->lockIP = $this->TYPO3_CONF_VARS['FE']['lockIP'];
     $this->fe_user->lockHashKeyWords = $this->TYPO3_CONF_VARS['FE']['lockHashKeyWords'];
     $this->fe_user->checkPid = $this->TYPO3_CONF_VARS['FE']['checkFeUserPid'];
     $this->fe_user->lifetime = intval($this->TYPO3_CONF_VARS['FE']['lifetime']);
     $this->fe_user->checkPid_value = $GLOBALS['TYPO3_DB']->cleanIntList(t3lib_div::_GP('pid'));
     // List of pid's acceptable
     // Check if a session is transferred:
     if (t3lib_div::_GP('FE_SESSION_KEY')) {
         $fe_sParts = explode('-', t3lib_div::_GP('FE_SESSION_KEY'));
         if (!strcmp(md5($fe_sParts[0] . '/' . $this->TYPO3_CONF_VARS['SYS']['encryptionKey']), $fe_sParts[1])) {
             // If the session key hash check is OK:
             $_COOKIE[$this->fe_user->name] = $fe_sParts[0];
             $this->fe_user->forceSetCookie = 1;
         }
     }
     if ($this->TYPO3_CONF_VARS['FE']['dontSetCookie']) {
         $this->fe_user->dontSetCookie = 1;
     }
     $this->fe_user->start();
     $this->fe_user->unpack_uc('');
     $this->fe_user->fetchSessionData();
     // Gets session data
     $recs = t3lib_div::_GP('recs');
     if (is_array($recs)) {
         // If any record registration is submitted, register the record.
         $this->fe_user->record_registration($recs, $this->TYPO3_CONF_VARS['FE']['maxSessionDataSize']);
     }
     // Call hook for possible manipulation of frontend user object
     if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'])) {
         $_params = array('pObj' => &$this);
         foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'] as $_funcRef) {
             t3lib_div::callUserFunction($_funcRef, $_params, $this);
         }
     }
     // For every 60 seconds the is_online timestamp is updated.
     if (is_array($this->fe_user->user) && $this->fe_user->user['uid'] && $this->fe_user->user['is_online'] < $GLOBALS['EXEC_TIME'] - 60) {
         $GLOBALS['TYPO3_DB']->exec_UPDATEquery('fe_users', 'uid=' . intval($this->fe_user->user['uid']), array('is_online' => $GLOBALS['EXEC_TIME']));
     }
 }