*/ $pwdSession = Check::safeText($_POST["md5_session"]); if ($pwdSession == "") { $pwdSession = Check::safeText($_POST["pwd_session"]); // JavaScript disabled? if ($pwdSession == "") { $errorFound = true; $formError["pwd_session"] = _("This is a required field."); } else { $pwdSession = md5($pwdSession); // JavaScript disabled! } } if (!isset($formError["pwd_session"])) { $userQ = new Query_User(); if (!$userQ->existLogin($loginSession)) { $errorFound = true; $formError["login_session"] = _("Login unknown."); $sessLoginAttempts = 1; $_SESSION['auth']['last_login'] = ''; } else { if (!$userQ->isActivated($loginSession)) { $userQ->close(); $_SESSION = array(); // deregister all current session variables FlashMsg::add(_("Your user account has been suspended. Contact with administrator to resolve this problem.")); header("Location: ../home/index.php"); exit; } $formSession = Form::getSession(); $lastLogin = isset($_SESSION['auth']['last_login']) ? $_SESSION['auth']['last_login'] : '';
*/ include_once "../auth/login_check.php"; loginCheck(OPEN_PROFILE_ADMINISTRATOR); } /** * Validate data */ require_once "../model/Query/User.php"; $user = new User(); $user->setIdUser($_POST["id_user"]); require_once "../admin/user_validate_post.php"; /** * Update user */ $userQ = new Query_User(); if ($userQ->existLogin($user->getLogin(), $user->getIdMember())) { $loginUsed = true; FlashMsg::add(sprintf(_("Login, %s, already exists. The changes have no effect."), $user->getLogin()), OPEN_MSG_WARNING); } else { $userQ->update($user); FlashMsg::add(sprintf(_("User, %s, has been updated."), $user->getLogin())); /** * updating session variables if user is current user */ if (isset($_POST["all"])) { $_SESSION['auth']['login_session'] = $user->getLogin(); $_SESSION['auth']['user_theme'] = $user->getIdTheme(); } } if ($changePwd && !$loginUsed) { if (!$userQ->verifySignOn($_POST["login"], $_POST["md5_old"], true)) {