title: CakePhp Routes & Session Variables
body: <p>Is there an intrinsic reason why I can't, in routes.php, route a user based on the contents of a session variable?  e.g.</p>
  
  <pre><code>Router::connect('/dashboard',
      array('controller'=&gt;'users','action'=&gt;'dash',1)
  );
  </code></pre>
  
  <p>works okay, but, replacing the 1 with $_SESSION['userid'] doesn't.</p>
  
  <p>Am I missing something important about session variables here?</p>
  
  <p>Alternative suggestions for rerouting a logged-in user from /dashboard to /controller/view/$userid without using a session variable would be equally appreciated!</p>