16 import(
'lib.pkp.classes.form.Form');
30 parent::__construct(
'controllers/grid/settings/user/form/userDisableForm.tpl');
32 $this->_userId = (int) $userId;
33 $this->_enable = (bool) $enable;
45 $user = $userDao->getById($this->_userId);
49 'disableReason' => $user->getDisabledReason()
71 function display($request =
null, $template =
null) {
73 $templateMgr->assign(array(
74 'userId' => $this->_userId,
75 'enable' => $this->_enable,
83 function execute(...$functionArgs) {
85 $user = $userDao->getById($this->_userId);
88 $user->setDisabled($this->_enable ?
false :
true);
89 $user->setDisabledReason($this->
getData(
'disableReason'));
90 $userDao->updateObject($user);
92 parent::execute(...$functionArgs);