public function edit() { //var_dump($usrgrpId);die(); if (!$this->securitypolicy->validateAccessRight(3, 'write')) { $this->load->view('access_denied'); } $this->load->library('form_validation'); $usergroup = new Usergroup($this->input->post('usergroup-id')); $this->_viewData['usrgrpDetl'] = $usergroup->getDetails(); if ($this->form_validation->run() == false) { $this->_backToForm(); } else { $usergroup->updateName($this->input->post('usergroup-name')); if (empty($usergroup->errors)) { $this->session->set_userdata(array('status' => 'success')); redirect(site_url('Admin/usergroup_manager'), 'refresh'); } else { $this->_viewData['errors'] = $usergroup->errors; $this->_backToForm(); } } }