original_string: final public function update($sessId, $userdata = array())
      {
  
          if (empty($sessId)) {
              return false;
          }
  
          $self = $this;
  
          //updates a started session for exp time
          //stores data for the registry
          $now = time();
          $newExpires = $now + $self->life;
  
          $update = array(
              "session_lastactive" => $now,
              "session_expires" => $newExpires
          );
          $self->id = $sessId;
  
          //If isset registry and is not empty, store userdata;
          if (isset($self->registry) && is_array($self->registry)) {
              $userdata = $this->input->serialize($self->registry);
              $update["session_registry"] = $userdata;
          }
          //Read the session
          $handler = $this->handler;
          //Must be called before the sesion start to generate the Id
          session_id($sessId);
          //session_start();
  
          if (!$handler->update($update, $self, $self->id)) {
              return false;
          }
  
          return true;
      }
code: final public function update($sessId, $userdata = array())
      {
  
          if (empty($sessId)) {
              return false;
          }
  
          $self = $this;
  
          //updates a started session for exp time
          //stores data for the registry
          $now = time();
          $newExpires = $now + $self->life;
  
          $update = array(
              "session_lastactive" => $now,
              "session_expires" => $newExpires
          );
          $self->id = $sessId;
  
          //If isset registry and is not empty, store userdata;
          if (isset($self->registry) && is_array($self->registry)) {
              $userdata = $this->input->serialize($self->registry);
              $update["session_registry"] = $userdata;
          }
          //Read the session
          $handler = $this->handler;
          //Must be called before the sesion start to generate the Id
          session_id($sessId);
          //session_start();
  
          if (!$handler->update($update, $self, $self->id)) {
              return false;
          }
  
          return true;
      }
code_tokens: final public function update ( $ sessId , $ userdata = array ( ) ) { if ( empty ( $ sessId ) ) { return false ; } $ self = $ this ; //updates a started session for exp time //stores data for the registry $ now = time ( ) ; $ newExpires = $ now + $ self -> life ; $ update = array ( "session_lastactive" => $ now , "session_expires" => $ newExpires ) ; $ self -> id = $ sessId ; //If isset registry and is not empty, store userdata; if ( isset ( $ self -> registry ) && is_array ( $ self -> registry ) ) { $ userdata = $ this -> input -> serialize ( $ self -> registry ) ; $ update [ "session_registry" ] = $ userdata ; } //Read the session $ handler = $ this -> handler ; //Must be called before the sesion start to generate the Id session_id ( $ sessId ) ; //session_start(); if ( ! $ handler -> update ( $ update , $ self , $ self -> id ) ) { return false ; } return true ; }
docstring: Updates a user session store on state change
  
  @param type $sessId
  @param type $userdata
  @return type
docstring_tokens: Updates a user session store on state change