original_string: protected function reinitializeUserSession(Framework $framework, WebRequest $request, Response $response)
      {
          $token = $request->getSessionData('userSessionToken');
          $lifetime = $request->getSessionData('userSessionTokenLifetime');
          
          list($notValid, $token, $lifetime, $userUuid) = $this->verifyToken($request, $token, $lifetime);
  
          // We do not load any user session because this session isn't 
          // okey. Our session token is not set or the lifetime is invalid or expired.
          // This is maybe an expired session or a hijacking attack...
          if ($notValid) {
              $this->cleanupSession($request);
              $this->regenerateSession($request);
              
              return false;
          }
          
          // Load the user
          $user = $this->userManager->getUserForUuid($userUuid);
          
          // If the user is disabled we cannot initialize the session
          if (!$user->hasAccess('\\Global\\*') && $user->hasAccess('\\Global\\Disabled')) {
              return false;
          }
  
          // Generate a new session object
          $session = new Session($user, $token, $lifetime);
          $request->setSession($session);
  
          // Generate a new token if the lifetime expires soon...
          if ($lifetime - 30 < time()) {
              $this->initializeUserSession($request, $response, $user);
          }
  
          return true;
      }
code: protected function reinitializeUserSession(Framework $framework, WebRequest $request, Response $response)
      {
          $token = $request->getSessionData('userSessionToken');
          $lifetime = $request->getSessionData('userSessionTokenLifetime');
          
          list($notValid, $token, $lifetime, $userUuid) = $this->verifyToken($request, $token, $lifetime);
  
          // We do not load any user session because this session isn't 
          // okey. Our session token is not set or the lifetime is invalid or expired.
          // This is maybe an expired session or a hijacking attack...
          if ($notValid) {
              $this->cleanupSession($request);
              $this->regenerateSession($request);
              
              return false;
          }
          
          // Load the user
          $user = $this->userManager->getUserForUuid($userUuid);
          
          // If the user is disabled we cannot initialize the session
          if (!$user->hasAccess('\\Global\\*') && $user->hasAccess('\\Global\\Disabled')) {
              return false;
          }
  
          // Generate a new session object
          $session = new Session($user, $token, $lifetime);
          $request->setSession($session);
  
          // Generate a new token if the lifetime expires soon...
          if ($lifetime - 30 < time()) {
              $this->initializeUserSession($request, $response, $user);
          }
  
          return true;
      }
code_tokens: protected function reinitializeUserSession ( Framework $ framework , WebRequest $ request , Response $ response ) { $ token = $ request -> getSessionData ( 'userSessionToken' ) ; $ lifetime = $ request -> getSessionData ( 'userSessionTokenLifetime' ) ; list ( $ notValid , $ token , $ lifetime , $ userUuid ) = $ this -> verifyToken ( $ request , $ token , $ lifetime ) ; // We do not load any user session because this session isn't  // okey. Our session token is not set or the lifetime is invalid or expired. // This is maybe an expired session or a hijacking attack... if ( $ notValid ) { $ this -> cleanupSession ( $ request ) ; $ this -> regenerateSession ( $ request ) ; return false ; } // Load the user $ user = $ this -> userManager -> getUserForUuid ( $ userUuid ) ; // If the user is disabled we cannot initialize the session if ( ! $ user -> hasAccess ( '\\Global\\*' ) && $ user -> hasAccess ( '\\Global\\Disabled' ) ) { return false ; } // Generate a new session object $ session = new Session ( $ user , $ token , $ lifetime ) ; $ request -> setSession ( $ session ) ; // Generate a new token if the lifetime expires soon... if ( $ lifetime - 30 < time ( ) ) { $ this -> initializeUserSession ( $ request , $ response , $ user ) ; } return true ; }
docstring: Verifies the session tokens and the session token life time and
  loads the user for the session.
  
  @access protected
  @param \Zepi\Turbo\Framework $framework
  @param \Zepi\Turbo\Request\WebRequest $request
  @param \Zepi\Turbo\Response\Response $response
  @return boolean
docstring_tokens: Verifies the session tokens and the session token life time and loads the user for the session .