public function cmdUpdateRole()
    {
        $params = $this->getParam();

        if (empty($params[0]) || count($params) < 2) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        if (!is_numeric($params[0])) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $this->setSubmitted(null, $params);
        $this->setSubmittedList('permissions');
        $this->setSubmitted('update', $params[0]);

        $this->validateComponent('user_role');

        $this->updateRole($params[0]);
        $this->output();
    }
public function cmdUpdateRole()
    {
        $params = $this->getParam();

        if (empty($params[0]) || count($params) < 2) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        if (!is_numeric($params[0])) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $this->setSubmitted(null, $params);
        $this->setSubmittedList('permissions');
        $this->setSubmitted('update', $params[0]);

        $this->validateComponent('user_role');

        $this->updateRole($params[0]);
        $this->output();
    }
public function cmdUpdateRole ( ) { $ params = $ this -> getParam ( ) ; if ( empty ( $ params [ 0 ] ) || count ( $ params ) < 2 ) { $ this -> errorAndExit ( $ this -> text ( 'Invalid command' ) ) ; } if ( ! is_numeric ( $ params [ 0 ] ) ) { $ this -> errorAndExit ( $ this -> text ( 'Invalid argument' ) ) ; } $ this -> setSubmitted ( null , $ params ) ; $ this -> setSubmittedList ( 'permissions' ) ; $ this -> setSubmitted ( 'update' , $ params [ 0 ] ) ; $ this -> validateComponent ( 'user_role' ) ; $ this -> updateRole ( $ params [ 0 ] ) ; $ this -> output ( ) ; }
Callback for "role-update" command
Callback for role - update command