public function pre() { $this->user = Authenticate::me(); if (!is_a($this->user, 'Kadmin') || $this->user->getType() != 'admin') { throw new Exception('Not Authorized', 401); } }