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

master
RuoYi 5 years ago committed by Limy
parent 73ba28281a
commit caae795d06

@ -196,8 +196,11 @@ public class SysUserController extends BaseController
user.setSalt(ShiroUtils.randomSalt()); user.setSalt(ShiroUtils.randomSalt());
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)
{
if (ShiroUtils.getUserId() == user.getUserId())
{ {
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId())); ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
}
return success(); return success();
} }
return error(); return error();

Loading…
Cancel
Save