<?php /** * Generates form and validation for editing users * * @copyright http://www.impresscms.org/ The ImpressCMS Project * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL) * @package Member * @subpackage Users * @version SVN: $Id: edituser.php 12085 2012-10-23 14:23:54Z sato-san $ */ $xoopsOption['pagetype'] = 'user'; include 'mainfile.php'; if (icms_get_module_status('profile') && file_exists(ICMS_MODULES_PATH . '/profile/edituser.php')) { header('Location: ' . ICMS_MODULES_URL . '/profile/edituser.php'); exit; } // If not a user, redirect if (!is_object(icms::$user)) { redirect_header('index.php', 3, _US_NOEDITRIGHT); } $op = ''; /* The following are the form elements, passed through $_POST 'user_sig' => 'html', 'bio'=> 'html', 'email' => array('email', 'options' => array(0, 1)), 'uid' => 'int', 'uname' => 'str', 'password' => 'str', 'old_password'=> 'str', 'change_pass' => 'int',
if (!empty($_POST)) foreach ($_POST as $k => $v) ${$k} = StopXSS($v); if (!empty($_GET)) foreach ($_GET as $k => $v) ${$k} = StopXSS($v); $fct = (isset($_GET['fct'])) ? trim(filter_input(INPUT_GET, 'fct')) : ((isset($_POST['fct'])) ? trim(filter_input(INPUT_POST, 'fct')) : ''); if (isset($fct) && $fct == 'users') {$xoopsOption['pagetype'] = 'user';} include '../../mainfile.php'; include ICMS_ROOT_PATH . '/include/cp_functions.php'; icms_loadLanguageFile('system', 'admin'); icms_loadLanguageFile('core', 'moduleabout'); // hook for profile module if (isset($fct) && $fct == 'users' && icms_get_module_status('profile')) { $op = isset($_GET['op']) ? filter_input(INPUT_GET, 'op') : ''; $uid = isset($_GET['uid']) ? filter_input(INPUT_GET, 'uid') : 0; if ($op == 'modifyUser' && $uid != 0) { header("Location:" . ICMS_MODULES_URL . "/profile/admin/user.php?op=edit&id=" . $uid); } else { header("Location:" . ICMS_MODULES_URL . "/profile/admin/user.php"); } } // Check if function call does exist (security) $admin_dir = ICMS_ROOT_PATH . '/modules/system/admin'; $dirlist = icms_core_Filesystem::getDirList($admin_dir); if ($fct && !in_array($fct, $dirlist)) {redirect_header(ICMS_URL . '/', 3, _INVALID_ADMIN_FUNCTION);} $admintest = 0;
<?php /** * @copyright http://www.impresscms.org/ The ImpressCMS Project * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL) * @package Member * @subpackage User * @version SVN: $Id: userinfo.php 21047 2011-03-14 15:52:14Z m0nty_ $ */ $xoopsOption['pagetype'] = 'user'; include 'mainfile.php'; $uid = (int) $_GET['uid']; if (icms_get_module_status("profile")) { $module = icms::handler("icms_module")->getByDirName("profile", TRUE); if ($module->config['profile_social'] && file_exists(ICMS_MODULES_PATH . '/profile/index.php')) { header('Location: ' . ICMS_MODULES_URL . '/profile/index.php?uid=' . $uid); exit; } elseif (!$module->config['profile_social'] && file_exists(ICMS_MODULES_PATH . '/profile/userinfo.php')) { header('Location: ' . ICMS_MODULES_URL . '/profile/userinfo.php?uid=' . $uid); exit; } unset($module); } include_once ICMS_MODULES_PATH . '/system/constants.php'; if (!$icmsConfigUser['allow_annon_view_prof'] && !is_object(icms::$user)) { redirect_header(ICMS_URL . '/user.php', 3, _NOPERM); } if ($uid <= 0) { redirect_header('index.php', 3, _US_SELECTNG); } $gperm_handler = icms::handler('icms_member_groupperm');