PasswordSetType
This commit is contained in:
@@ -214,9 +214,10 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
|
||||
}
|
||||
|
||||
|
||||
public boolean changePassword(String oldPassword,
|
||||
String newPassword,
|
||||
String confirmPassword) {
|
||||
public boolean changePassword( String oldPassword,
|
||||
String newPassword,
|
||||
String confirmPassword,
|
||||
int passwordSetType) {
|
||||
try {
|
||||
WebContext.setAttribute(PasswordPolicyValidator.PASSWORD_POLICY_VALIDATE_RESULT, "");
|
||||
UserInfo userInfo = WebContext.getUserInfo();
|
||||
@@ -225,6 +226,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
|
||||
changeUserInfo.setPassword(newPassword);
|
||||
changeUserInfo.setId(userInfo.getId());
|
||||
changeUserInfo.setDecipherable(userInfo.getDecipherable());
|
||||
changeUserInfo.setPasswordSetType(passwordSetType);
|
||||
|
||||
if(newPassword.equals(confirmPassword)){
|
||||
if(oldPassword==null ||
|
||||
|
||||
@@ -95,12 +95,12 @@
|
||||
|
||||
<update id="changePassword" parameterType="UserInfo" >
|
||||
update mxk_userinfo set
|
||||
<if test="password != null">
|
||||
password = #{password},
|
||||
decipherable = #{decipherable},
|
||||
</if>
|
||||
passwordsettype = 0,
|
||||
passwordlastsettime = current_timestamp
|
||||
<if test="password != null">
|
||||
password = #{password},
|
||||
decipherable = #{decipherable},
|
||||
passwordsettype = #{passwordSetType},
|
||||
</if>
|
||||
passwordlastsettime = current_timestamp
|
||||
where
|
||||
id = #{id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user