当前用户重置密码修改缓存

pull/108/head
RuoYi 2019-07-16 09:05:23 +08:00
parent bf49b35978
commit 900de5db80
1 changed files with 4 additions and 1 deletions

View File

@ -197,7 +197,10 @@ public class SysUserController extends BaseController
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt())); user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
if (userService.resetUserPwd(user) > 0) if (userService.resetUserPwd(user) > 0)
{ {
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId())); if (ShiroUtils.getUserId() == user.getUserId())
{
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
}
return success(); return success();
} }
return error(); return error();