public function updateAction() { $data = $this->getGroupData($_POST); if (empty($data)) { $this->_redirect("/admin/group/"); } $group_name = str_replace(USVN_URL_SEP, '/', $this->getRequest()->getParam('name')); $table = new USVN_Db_Table_Groups(); $group = $table->fetchRow(array("groups_name = ?" => $group_name)); if ($group === null) { throw new USVN_Exception(T_("Invalid group %s."), $group_name); } $group->setFromArray($data); try { $group->save(); $this->_redirect("/admin/group/"); } catch (USVN_Exception $e) { $this->view->group = $group; $this->view->message = $e->getMessage(); $table = new USVN_Db_Table_Users(); $this->view->users = $table->fetchAll(null, "users_login"); $this->render('edit'); } }
public function indexAction() { $table = new USVN_Db_Table_Users(); $this->view->users = $table->fetchAll(null, "users_login"); }