title: Destroying a specific session in Code Igniter
body: <p>I want to be able to log users out of my app built in Code Igniter.</p>
  
  <p>I know how to end an active local session:</p>
  
  <pre><code>$this-&gt;session-&gt;sess_destroy();
  </code></pre>
  
  <p>But how can I destroy a session that was started on another computer and thereby log a user out of their session?</p>
  
  <p>I store a unique id associated with their account in the session data, so I can see it in the session table in the database, but it is stored along with the other session data in a column called user_data, the contents of which look something like this:</p>
  
  <pre><code>a:4:
  {s:9:"user_data";s:0:"";s:6:"userid";s:6:"189034";s:9:"logged_in";b:1;s:5:"token";i:1767727789;}
  </code></pre>
  
  <p>where <code>189034</code> is the user's id.</p>
  
  <p>So, is there a way to somehow select the row in the session table based on the user's id, and then delete the row and destroy the session.  Or is there another way to do this entirely?</p>