needlogin=true; $me = new User(); $me->loadMe(); $this->me = $me; $this->layout()->set("me",$me); if(!$me->is(["Admin"])) { $this->redirect("Dashboard"); } } protected function indexAction() { $this->layout()->setTemplate("Preorder/Index"); $campaigns = PreorderModel::getAll(); $this->layout()->set("campaigns", $campaigns); } }