Skip to content

Commit

Permalink
presentUser가 null인 경우 오류 발생 수정 (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
asp345 authored Nov 8, 2024
1 parent 3e765c8 commit 116d8de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/kotlin/users/service/UserService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ class UserServiceImpl(
val oauth2UserResponse = authService.socialLoginWithAccessToken(authProvider, token)
if (oauth2UserResponse.email != null) {
val presentUser = userRepository.findByEmailIgnoreCaseAndIsEmailVerifiedTrueAndActiveTrue(oauth2UserResponse.email)
if (presentUser?.id != user.id) {
throw DuplicateEmailException(getAttachedAuthProviders(user))
if (presentUser != null && presentUser.id != user.id) {
throw DuplicateEmailException(getAttachedAuthProviders(presentUser))
}
}

Expand Down

0 comments on commit 116d8de

Please sign in to comment.