Skip to content

Commit

Permalink
Merge pull request #108 from Funssion-SWM/develope
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
goathoon authored Oct 11, 2023
2 parents fa0c136 + 79d5102 commit a26dd1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public SaveMemberResponseDto requestMemberRegistration (MemberSaveDto memberSave
NonSocialMember member = NonSocialMember.createNonSocialMember(memberSaveDto);
SaveMemberResponseDto savedMember = memberRepository.save(member);

UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(memberSaveDto.getUserEmail(), memberSaveDto.getUserPw());
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(savedMember.getId(), memberSaveDto.getUserPw());
SecurityContextHolder.getContext().setAuthentication(authentication);

makeLoginForSavedUser(request, response, authentication);
Expand Down Expand Up @@ -138,6 +138,9 @@ public ValidatedDto isValidEmail(String email){
return new ValidatedDto(isEmailAvailable,message);
}
public ValidatedDto isRegisteredEmail(String email){
if(memberRepository.findSocialMemberByEmail(email).isPresent()){
return new ValidatedDto(false,"구글 로그인으로 등록된 계정입니다.");
}

boolean isEmailRegistered = memberRepository.findNonSocialMemberByEmail(email).isPresent();
String message = isEmailRegistered ? "해당 이메일로 코드를 전송하겠습니다." : "해당 이메일로 가입된 회원 정보가 없습니다.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@

import Funssion.Inforum.common.constant.PostType;
import Funssion.Inforum.common.constant.Sign;
import Funssion.Inforum.domain.mypage.domain.History;

import Funssion.Inforum.domain.member.dto.response.IsProfileSavedDto;
import Funssion.Inforum.domain.member.entity.MemberProfileEntity;
import Funssion.Inforum.domain.post.memo.domain.Memo;
import org.springframework.cglib.core.Local;
import Funssion.Inforum.domain.mypage.domain.History;

import java.sql.Date;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

public interface MyRepository {
Expand Down

0 comments on commit a26dd1b

Please sign in to comment.