/**
  * init session after successful login
  * 
  * @param Tinebase_Model_FullUser $user
  * @param boolean $fixCookieHeader
  */
 protected function _initUserSession($fixCookieHeader = true)
 {
     // FIXME 0010508: Session_Validator_AccountStatus causes problems
     //Tinebase_Session::registerValidatorAccountStatus();
     Tinebase_Session::registerValidatorMaintenanceMode();
     if (Tinebase_Config::getInstance()->get(Tinebase_Config::SESSIONUSERAGENTVALIDATION, TRUE)) {
         Tinebase_Session::registerValidatorHttpUserAgent();
     } else {
         Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' User agent validation disabled.');
     }
     // we only need to activate ip session validation for non-encrypted connections
     $ipSessionValidationDefault = Tinebase_Core::isHttpsRequest() ? FALSE : TRUE;
     if (Tinebase_Config::getInstance()->get(Tinebase_Config::SESSIONIPVALIDATION, $ipSessionValidationDefault)) {
         Tinebase_Session::registerValidatorIpAddress();
     } else {
         Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' Session ip validation disabled.');
     }
     if ($fixCookieHeader && Zend_Session::getOptions('use_cookies')) {
         /** 
          * fix php session header handling http://forge.tine20.org/mantisbt/view.php?id=4918 
          * -> search all Set-Cookie: headers and replace them with the last one!
          **/
         $cookieHeaders = array();
         foreach (headers_list() as $headerString) {
             if (strpos($headerString, 'Set-Cookie: TINE20SESSID=') === 0) {
                 array_push($cookieHeaders, $headerString);
             }
         }
         header(array_pop($cookieHeaders), true);
         /** end of fix **/
     }
     Tinebase_Session::getSessionNamespace()->currentAccount = Tinebase_Core::getUser();
 }