diff --git a/src/main/java/org/poolc/api/member/service/MemberService.java b/src/main/java/org/poolc/api/member/service/MemberService.java index df985900..b1c56461 100644 --- a/src/main/java/org/poolc/api/member/service/MemberService.java +++ b/src/main/java/org/poolc/api/member/service/MemberService.java @@ -226,6 +226,12 @@ public List getAllMembersAndUpdateMemberIsExcepted() { return members; } + public String findNameByLoginID(String loginID) { + Member member = memberRepository.findByLoginID(loginID) + .orElseThrow(() -> new NoSuchElementException("No member with given login ID.")); + return member.getLoginID(); + } + private String resetMemberPasswordToken(String email) { Member resetMember = memberRepository.findByEmail(email) .orElseThrow(() -> new NoSuchElementException("No user found with given email"));