This commit is contained in:
mashuai 2024-05-28 09:29:29 +08:00
parent e2b9f17790
commit a79ab95fe0
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ public class SysProfileController extends BaseController {
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd")
public AjaxResult updatePwd(String oldPassword, String newPassword) {
String username = SecurityUtils.getUsername();
String username = SecurityUtils.getLoginUser().getUsername();
SysUser user = userService.selectUserByUserName(username);
String password = user.getPassword();
if (!SecurityUtils.matchesPassword(oldPassword, password)) {