title: Codeigniter session timeout message
body: <p>I'm not new to CodeIgniter, but I'm not a pro either... still getting used to it, I suppose.  I'm curious to see if anyone has any ideas as to how to display a message saying a session has timed out when the Session library kills an inactive session.</p>
  
  <p>I've tried extending the Session.php library and adding:</p>
  
  <pre><code>// Is the session current?
      if (($session['last_activity'] + $this-&gt;sess_expiration) &lt; $this-&gt;now)
      {
          $this-&gt;sess_destroy();
          $this-&gt;set_flashdata('timeout_message', "Session Timed Out."); // &lt;--added
          return FALSE;
      }
  </code></pre>
  
  <p>But I think when FALSE is returned and my controller redirects to the page that will display the flash message.. the flash data is erased.</p>
  
  <p>Any ideas?</p>