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("Callcenterstats/Index"); $identities = CallcenterIdentity::getAll(); $this->layout()->set("identities", $identities); } }