From 3347ca4d7484d9141b189462e169b2be4d324632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9F=E5=BC=BA?= Date: Tue, 27 Jul 2021 09:33:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:Issue=20#I42GRW=20=20=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BB=BB=E6=84=8F=E8=B4=A6=E6=88=B7=E8=B6=8A=E6=9D=83=E6=BC=8F?= =?UTF-8?q?=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/system/SysProfileController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java index a9dcce81..899c60eb 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java @@ -71,9 +71,12 @@ public class SysProfileController extends BaseController { return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); } + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + SysUser sysUser = loginUser.getUser(); + user.setUserId(sysUser.getUserId()); + user.setPassword(null); if (userService.updateUserProfile(user) > 0) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); // 更新缓存用户信息 loginUser.getUser().setNickName(user.getNickName()); loginUser.getUser().setPhonenumber(user.getPhonenumber());