19 return xoops_getrequest(
'uid');
24 $handler =& xoops_getmodulehandler(
'users');
31 $this->mActionForm->prepare();
40 $this->mObject =& $this->mObjectHandler->get($id);
43 $root =& XCube_Root::getSingleton();
44 $this->mObject =& $this->mObjectHandler->create();
45 $this->mObject->set(
'timezone_offset', $root->mContext->getXoopsConfig(
'server_TZ'));
49 public function executeViewInput(&$controller, &$xoopsUser, &$render)
51 $render->setTemplateName(
'user_edit.html');
52 $render->setAttribute(
'actionForm', $this->mActionForm);
57 $tzoneHandler =& xoops_gethandler(
'timezone');
58 $timezones =& $tzoneHandler->getObjects();
60 $render->setAttribute(
'timezones', $timezones);
62 $rankHandler =& xoops_getmodulehandler(
'ranks');
63 $ranks =& $rankHandler->getObjects(
new Criteria(
'rank_special', 1));
65 $render->setAttribute(
'ranks', $ranks);
67 $groupHandler =& xoops_gethandler(
'group');
68 $groups =& $groupHandler->getObjects(
null,
true);
71 foreach ($groups as $gid => $group) {
72 $groupOptions[$gid] = $group->getVar(
'name');
75 $render->setAttribute(
'groupOptions', $groupOptions);
80 $umodeOptions = [
'nest' => _NESTED,
'flat' => _FLAT,
'thread' => _THREADED];
81 $render->setAttribute(
'umodeOptions', $umodeOptions);
86 $uorderOptions = [0 => _OLDESTFIRST, 1 => _NEWESTFIRST];
87 $render->setAttribute(
'uorderOptions', $uorderOptions);
96 $root =& XCube_Root::getSingleton();
97 $root->mLanguageManager->loadPageTypeMessageCatalog(
'notification');
98 require_once XOOPS_ROOT_PATH .
'/include/notification_constants.php';
101 $service =& $root->mServiceManager->getService(
'privateMessage');
104 $methodOptions[XOOPS_NOTIFICATION_METHOD_DISABLE] = _NOT_METHOD_DISABLE;
105 if (
null != $service) {
106 $methodOptions[XOOPS_NOTIFICATION_METHOD_PM] = _NOT_METHOD_PM;
108 $methodOptions[XOOPS_NOTIFICATION_METHOD_EMAIL] = _NOT_METHOD_EMAIL;
110 $render->setAttribute(
'notify_methodOptions', $methodOptions);
113 XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS,
114 XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE,
115 XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN
117 $render->setAttribute(
'notify_modeOptions', $modeOptions);
122 $ret = parent::_doExecute();
123 $this->mActionForm->set(
'uid', $this->mObject->get(
'uid'));
125 XCube_DelegateUtils::call(
'Legacy_Profile.SaveProfile',
new XCube_Ref($ret), $this->mActionForm);
130 public function executeViewSuccess(&$controller, &$xoopsUser, &$render)
132 $controller->executeForward(
'./index.php?action=UserList');
135 public function executeViewError(&$controller, &$xoopsUser, &$render)
137 $controller->executeRedirect(
'index.php', 1, _MD_USER_ERROR_DBUPDATE_FAILED);
140 public function executeViewCancel(&$controller, &$xoopsUser, &$render)
142 $controller->executeForward(
'./index.php?action=UserList');