title: How to save a single data from session_data in ci_session
body: <p>I need a single data like <code>first_name</code> to be save to another field using <code>ci_session</code>. How can I achieve this?</p>
  
  <p>Here's <code>$session_data</code> that it's saving to <code>ci_session</code>. I need an specific data inside of it to be passed on to the log field.</p>
  
  <blockquote>
    <p>__ci_last_regenerate|i:1558420176;logged_in|b:1;profile|O:8:"stdClass":18:{s:2:"id";s:1:"1";s:5:"email";s:17:"teacher@email.com";s:7:"role_id";s:1:"2";s:19:"tekteach_login_flag";s:1:"0";s:15:"date_registered";s:19:"0000-00-00 00:00:00";s:7:"deleted";s:1:"0";s:10:"first_name";s:4:"omar";s:9:"last_name";s:4:"isip";s:11:"middle_name";s:7:"chester";s:6:"gender";s:4:"Male";s:8:"birthday";s:10:"2019-05-10";s:6:"status";s:6:"Active";s:12:"grade_course";s:0:"";s:10:"created_on";N;s:10:"created_by";s:1:"0";s:11:"modified_on";N;s:11:"modified_by";s:1:"0";s:10:"deleted_by";s:1:"0";}</p>
  </blockquote>
  
  <pre><code>if ($this-&gt;_row_exists === FALSE)
  {
      $insert_data = array(
          'id' =&gt; $session_id,
          'ip_address' =&gt; $_SERVER['REMOTE_ADDR'],
          'timestamp' =&gt; time(),
          'data' =&gt; ($this-&gt;_platform === 'postgre' ? base64_encode($session_data) : $session_data),
          'log' =&gt; 1 //my own field
      );
  </code></pre>