public void logout() { String logouturl = Config.getContextPath() + "Logout.jsp"; this.response.put("Status", 1); UserLogPage.log("Log", "Logout", "正常退出系统", this.request.getClientIP()); redirect(logouturl); }
public void changePassword() throws SQLException { String OldPassword = $V("OldPassword"); String Password = $V("Password"); QueryBuilder qb = new QueryBuilder("update ZDUser set Password=? where UserName=? and Password=?"); qb.add(XString.md5Hex(Password)); qb.add(User.getUserName()); qb.add(XString.md5Hex(OldPassword)); if (qb.executeNoQuery() > 0) { UserLogPage.log("User", "EditPassword", "修改密码成功", this.request.getClientIP()); this.response.setMessage("修改密码成功"); this.response.setStatus(1); } else { UserLogPage.log("User", "EditPassword", "修改密码失败", this.request.getClientIP()); this.response.setStatus(0); this.response.setMessage("修改密码失败,旧密码不正确"); } }