protected function _returnToForm()
 {
     $this->load->helper('form');
     $modules = new ModuleColl();
     $modules->setAll();
     # get module names and id
     $drpdown_module = array();
     $drpdown_module[''] = '--Select a Module--';
     foreach ($modules->getDetails() as $key => $module) {
         $drpdown_module[$module['id']] = $module['name'];
     }
     $this->_viewData['dropdown']['module'] = $drpdown_module;
     $usergroup = new UsergroupColl();
     $usergroup->set();
     # get usergroup names and id
     $drpdown_usergroup = array();
     $drpdown_usergroup[''] = '--Select a Usergroup--';
     foreach ($usergroup->getDetails() as $key => $usrgrp_dtl) {
         $drpdown_usergroup[$usrgrp_dtl['id']] = $usrgrp_dtl['name'];
     }
     $this->_viewData['dropdown']['usergroup'] = $drpdown_usergroup;
     $this->_viewData['showmsg'] = true;
     $this->_viewData['status'] = 'error';
     $this->load->view('useraccess_add', $this->_viewData);
 }
 protected function _setUserEditView($userId = 0)
 {
     $this->load->helper('form');
     $user = new User($userId);
     $this->_viewData['userProfile'] = $user->getProfile();
     $usergroup = new UsergroupColl();
     $usergroup->set();
     $usrgrpsDetl = $usergroup->getDetails();
     $this->_viewData['dropdown']['usergroup'] = array();
     $this->_viewData['dropdown']['usergroup'][''] = '--Choose Usergroup--';
     foreach ($usrgrpsDetl as $usrgrpDetl) {
         $this->_viewData['dropdown']['usergroup'][$usrgrpDetl['id']] = $usrgrpDetl['name'];
     }
     $this->_viewData['default']['usergroup'] = $this->_viewData['userProfile']['usergroup'];
 }
 protected function _backToForm()
 {
     $this->load->helper('form');
     $usergroups = new UsergroupColl();
     $usergroups->set();
     $usrgrpsDetl = $usergroups->getDetails();
     $this->_viewData['dropdown']['usergroup'][''] = '--Choose Usergroup--';
     foreach ($usrgrpsDetl as $usrgrpDetl) {
         $this->_viewData['dropdown']['usergroup'][$usrgrpDetl['id']] = $usrgrpDetl['name'];
     }
     $this->_viewData['default']['usergroup'] = $this->input->post('user-usergroup');
     $this->_viewData['showmsg'] = true;
     $this->_viewData['status'] = 'error';
     $this->_viewData['errors'] = $this->_errors;
     $this->load->view('user_add', $this->_viewData);
 }