modify
This commit is contained in:
parent
ac650575c1
commit
136ccb7a2d
|
@ -73,12 +73,18 @@ public class MemberService {
|
||||||
|
|
||||||
Member preMember = this.memberDAO.findByEmail(member.getEmail());
|
Member preMember = this.memberDAO.findByEmail(member.getEmail());
|
||||||
|
|
||||||
member.setPw(passwordEncoder.encode(pw));
|
if (null != pw && !pw.equals("")) {
|
||||||
Boolean match = passwordEncoder.matches(member.getPw(), preMember.getPw());
|
Boolean match = passwordEncoder.matches(member.getPw(), preMember.getPw());
|
||||||
if(match) {
|
if(!match) {
|
||||||
throw new EqualsOldPasswordException();
|
member.setPw(passwordEncoder.encode(pw));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
member.setPw(preMember.getPw());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (member.getStatus() == null || member.getStatus().getId() < 0) {
|
||||||
|
member.getStatus().setId(preMember.getStatus().getId());
|
||||||
|
}
|
||||||
return this.memberDAO.save(member);
|
return this.memberDAO.save(member);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user