exit(''); } if (exponent_permissions_check('user_management', exponent_core_makeLocation('AdministrationModule'))) { if (!defined('SYS_USERS')) { require_once BASE . 'subsystems/users.php'; } if (!defined('SYS_FORMS')) { require_once BASE . 'subsystems/forms.php'; } exponent_forms_initialize(); $u = exponent_users_getUserById(intval($_GET['id'])); if ($u == null) { $u->is_admin = 0; $u->is_acting_admin = 0; } $u = exponent_users_getFullProfile($u); $form = exponent_users_form($u); $form->meta('module', 'AdministrationModule'); $form->meta('action', 'umgr_saveuser'); if ($user->is_admin == 1 && $u->is_admin == 0) { // Super user editting a 'lesser' user. $i18n = exponent_lang_loadFile('modules/AdministrationModule/actions/umgr_editprofile.php'); $form->registerBefore('submit', 'is_acting_admin', $i18n['is_admin'], new checkboxcontrol($u->is_acting_admin, true)); } $template = new template('AdministrationModule', '_umgr_editprofile', $loc); $template->assign('form_html', $form->toHTML()); $template->assign('is_edit', isset($u->id) ? 1 : 0); $template->output(); } else { echo SITE_403_HTML; }
# it and/or modify it under the terms of the GNU # General Public License as published by the Free # Software Foundation; either version 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } if (SITE_ALLOW_REGISTRATION == 1) { if (!defined('SYS_USERS')) { require_once 'subsystems/users.php'; } if (!defined('SYS_FORMS')) { require_once 'subsystems/forms.php'; } exponent_forms_initialize(); $form = exponent_users_form(null); $form->meta('module', 'LoginModule'); $form->meta('action', 'saveuser'); if (SITE_USE_CAPTCHA && EXPONENT_HAS_GD) { $i18n = exponent_lang_loadFile('modules/LoginModule/actions/createuser.php'); $form->registerBefore('submit', null, '', new htmlcontrol(sprintf($i18n['captcha_description'], '<img src="' . PATH_RELATIVE . 'captcha.php" />'), false)); $form->registerBefore('submit', 'captcha_string', '', new textcontrol('', 6)); } $template = new template('LoginModule', '_form_createUser', $loc); $template->assign('form_html', $form->toHTML()); $template->output(); }