아이디 찾기 오류 대응
This commit is contained in:
@@ -75,9 +75,10 @@ public class PortalUserAuthService implements UserDetailsService {
|
||||
|
||||
public List<PortalUserDTO> findAllUsersByNameAndMobile(String userName, String mobileNumber) {
|
||||
try {
|
||||
// 전화번호에서 - 제거하여 조회
|
||||
String normalizedMobileNumber = mobileNumber != null ? mobileNumber.replace("-", "") : null;
|
||||
List<PortalUser> users = portalUserRepository.findAllByUserNameAndMobileNumber(userName, normalizedMobileNumber);
|
||||
if (mobileNumber == null || !mobileNumber.matches("^\\d{2,3}-\\d{3,4}-\\d{4}$")) {
|
||||
throw new UserNotFoundException("유효하지 않은 휴대폰 번호 형식입니다.");
|
||||
}
|
||||
List<PortalUser> users = portalUserRepository.findAllByUserNameAndMobileNumber(userName, mobileNumber);
|
||||
if (users == null || users.isEmpty()) {
|
||||
throw new UserNotFoundException("입력하신 사용자 정보가 올바르지 않습니다. 다시 확인해 주세요.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user