public function action_delete() { //get name of the param, get the name of the custom fields, deletes from config array and alters table $this->auto_render = FALSE; $name = $this->request->param('id'); $field = new Model_UserField(); try { $this->template->content = $field->delete($name) ? sprintf(__('Field %s deleted'), $name) : sprintf(__('Field %s does not exists'), $name); } catch (Exception $e) { //throw 500 throw HTTP_Exception::factory(500, $e->getMessage()); } }