26 $xoops->preload()->triggerEvent(
'core.edituser.start');
27 $xoops->loadLanguage(
'user');
36 $op = Request::getCmd(
'op',
'editprofile');
39 if (
$op ==
'saveuser') {
40 if (!
$xoops->security()->check()) {
48 $uid = Request::getInt(
'uid', 0);
55 if (
$xoops->getConfig(
'allow_chgmail') == 1) {
56 $email = Request::getString(
'email',
'');
62 $password = Request::getString(
'password',
'');
63 $password =
$myts->stripSlashesGPC(trim($password));
64 if ($password !=
'') {
65 if (mb_strlen($password) <
$xoops->getConfig(
'minpass')) {
68 $vpass = Request::getString(
'vpass',
'');
74 if (count($errors) > 0) {
77 foreach ($errors as $er) {
78 echo
'<span class="red bold">' . $er .
'</span><br />';
85 $edituser->setVar(
'name', Request::getString(
'name',
''));
86 if (
$xoops->getConfig(
'allow_chgmail') == 1) {
87 $edituser->setVar(
'email',
$email,
true);
89 if ($password !=
'') {
90 $edituser->setVar(
'pass', password_hash($password, PASSWORD_DEFAULT),
true);
92 $edituser->setVar(
'url',
$xoops->formatURL(Request::getUrl(
'url',
'')));
93 $edituser->setVar(
'user_icq', Request::getString(
'user_icq',
''));
94 $edituser->setVar(
'user_from', Request::getString(
'user_from',
''));
95 $edituser->setVar(
'user_sig',
XoopsLocale::substr(Request::getString(
'user_sig',
''), 0, 255));
96 $edituser->setVar(
'user_viewemail', Request::getBool(
'user_viewemail', 0));
97 $edituser->setVar(
'user_aim', Request::getString(
'user_aim',
''));
98 $edituser->setVar(
'user_yim', Request::getString(
'user_yim',
''));
99 $edituser->setVar(
'user_msnm', Request::getString(
'user_msnm',
''));
100 $edituser->setVar(
'attachsig', Request::getBool(
'attachsig', 0));
101 $edituser->setVar(
'timezone_offset', Request::getFloat(
'timezone_offset', 0));
102 $edituser->setVar(
'uorder', Request::getInt(
'uorder', 0));
103 $edituser->setVar(
'umode', Request::getString(
'umode',
'flat'));
104 $edituser->setVar(
'notify_method', Request::getInt(
'notify_method', 1));
105 $edituser->setVar(
'notify_mode', Request::getInt(
'notify_mode', 1));
107 $edituser->setVar(
'user_occ', Request::getString(
'user_occ',
''));
108 $edituser->setVar(
'user_intrest', Request::getString(
'user_intrest',
''));
109 $edituser->setVar(
'user_mailok', Request::getBool(
'user_mailok', 0));
112 echo $edituser->getHtmlErrors();
121 if (
$op ==
'editprofile') {
122 $xoops->header(
'module:system/system_edituser.tpl');
123 $xoops->tpl()->assign(
'uid',
$xoops->user->getVar(
"uid"));
124 $xoops->tpl()->assign(
'editprofile',
true);
127 $form->addElement($uname_label);
129 $form->addElement($name_text);
131 if (
$xoops->getConfig(
'allow_chgmail') == 1) {
137 $email_cbox_value =
$xoops->user->user_viewemail() ? 1 : 0;
143 $form->addElement($url_text);
148 $xoops->user->getVar(
'timezone_offset')
159 $xoops->user->getVar(
'user_from',
'E')
166 $xoops->user->getVar(
'user_occ',
'E')
173 $xoops->user->getVar(
'user_intrest',
'E')
177 $sig_tray->addElement($sig_tarea);
178 $sig_cbox_value =
$xoops->user->getVar(
'attachsig') ? 1 : 0;
181 $sig_tray->addElement($sig_cbox);
188 $pwd_tray->addElement($pwd_text);
189 $pwd_tray->addElement($pwd_text2);
193 $xoops->user->getVar(
'user_mailok')
199 $form->addElement($timezone_select);
200 $form->addElement($icq_text);
201 $form->addElement($aim_text);
202 $form->addElement($yim_text);
203 $form->addElement($msnm_text);
204 $form->addElement($location_text);
205 $form->addElement($occupation_text);
206 $form->addElement($interest_text);
207 $form->addElement($sig_tray);
208 $form->addElement($bio_tarea);
209 $form->addElement($pwd_tray);
210 $form->addElement($mailok_radio);
211 $form->addElement($uid_hidden);
212 $form->addElement($op_hidden);
214 $form->addElement($submit_button);
215 if (
$xoops->getConfig(
'allow_chgmail') == 1) {
if(!$xoops->isUser()) $op
const E_NO_ACTION_PERMISSION
if($uname== ''||$pass== '') $member_handler
const EF_PASSWORD_MUST_BE_GREATER_THAN
defined('DS') or define('DS' DIRECTORY_SEPARATOR
const S_YOUR_PROFILE_UPDATED
if(!$xoops->isUser()) $uid
const E_PASSWORDS_MUST_MATCH
const TYPE_NEW_PASSWORD_TWICE_TO_CHANGE_IT
const ALWAYS_ATTACH_MY_SIGNATURE
const Q_RECEIVE_OCCASIONAL_EMAIL_NOTICES_FROM_ADMINISTRATORS
const ALLOW_OTHER_USERS_TO_VIEW_EMAIL
static substr($str, $start, $length, $trimmarker= '...')