needlogin=true; $me = new User(); $me->loadMe(); $this->me = $me; $this->layout()->set("me",$me); if(!$me->is(["Admin", "netowner", "salespartner"]) && !$me->can("Preorder")) { $this->redirect("Dashboard"); } } protected function indexAction() { $this->layout()->setTemplate("PreorderProduct/Index"); //$product = } }