update ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java.
此处新密码加密了两次,多余的操作,且会导致新生成的数据库密码与缓存中的密码不同,如果修改的不对还请讲解回复下,谢谢。
Signed-off-by: 张利 <zhangli_wei555@163.com>
| | |
| | | {
|
| | | return error("新密码不能与旧密码相同");
|
| | | }
|
| | | if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0)
|
| | | newPassword = SecurityUtils.encryptPassword(newPassword);
|
| | | if (userService.resetUserPwd(userName, newPassword) > 0)
|
| | | {
|
| | | // 更新缓存用户密码
|
| | | loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
|
| | | loginUser.getUser().setPassword(newPassword);
|
| | | tokenService.setLoginUser(loginUser);
|
| | | return success();
|
| | | }
|