Hi,
I have a custom routing class that checks versioning of an object to allow for creation of draft versions of pages that wont appear on the live site. When an admin clicks to preview a draft version of a page my PublishingHelper class on the front-end (called from the routing class) checks the user's permissions to see if they are allowed to view the draft version of this page.
I am using this code:
$context = sfContext::getInstance();
$user = $context->getUser();
But $user is NULL.
Does anyone have any ideas? All my searches seem to say this is the right way of getting the user object.
Thanks,
Tom