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.
Router::connect('/dashboard',
array('controller'=>'users','action'=>'dash',1)
);
works okay, but, replacing the 1 with $_SESSION['userid'] doesn't.
Am I missing something important about session variables here?
Alternative suggestions for rerouting a logged-in user from /dashboard to /controller/view/$userid without using a session variable would be equally appreciated!