|
@@ -1,5 +1,6 @@
|
|
|
package com.ruoyi.web.controller.system;
|
|
|
|
|
|
+import com.ruoyi.framework.util.MD5Util;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -83,8 +84,9 @@ public class SysProfileController extends BaseController
|
|
|
SysUser user = ShiroUtils.getSysUser();
|
|
|
if (StringUtils.isNotEmpty(newPassword) && passwordService.matches(user, oldPassword))
|
|
|
{
|
|
|
- user.setSalt(ShiroUtils.randomSalt());
|
|
|
- user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
|
|
|
+ //user.setSalt(ShiroUtils.randomSalt());
|
|
|
+ //user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
|
|
|
+ user.setPassword(MD5Util.string2MD5(newPassword));
|
|
|
if (userService.resetUserPwd(user) > 0)
|
|
|
{
|
|
|
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|