title: Preserve Session on Logout and Login
body: <p>I print out the session ID like this:</p>
  
  <pre><code>&lt;?php print YII::app()-&gt;session-&gt;sessionID; ?&gt;
  </code></pre>
  
  <p>When I <code>log-in</code> and check my <code>ID</code>, it is something like: <code>huh09vuo33scdlkmfuc8651t12</code>, for example. If I log out and check again, my ID remains the same. However, if I then log back in again, the session ID changes! </p>
  
  <p><strong>My problem</strong> is that I have information in my session that I need to store in a cookie and reload after login. How can I uniquely establish that the user logged in is the correct user if his session ID changes?</p>