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.setPw(passwordEncoder.encode(pw));
|
||||
Boolean match = passwordEncoder.matches(member.getPw(), preMember.getPw());
|
||||
if(match) {
|
||||
throw new EqualsOldPasswordException();
|
||||
if (null != pw && !pw.equals("")) {
|
||||
Boolean match = passwordEncoder.matches(member.getPw(), preMember.getPw());
|
||||
if(!match) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user