소셜 로그인 가입 처리 수정
This commit is contained in:
@@ -586,7 +586,6 @@ function social_check_login_before($p_service=''){
|
||||
/*
|
||||
* 회원이 아닌 경우에만 아래 실행
|
||||
*/
|
||||
|
||||
$register_url = G5_SOCIAL_LOGIN_URL.'/register_member.php?provider='.$provider_name;
|
||||
|
||||
if( $url ){
|
||||
@@ -805,29 +804,6 @@ function social_login_success_after($mb, $link='', $mode='', $tmp_create_info=ar
|
||||
}
|
||||
|
||||
if($mode=='register'){ //회원가입 했다면
|
||||
|
||||
//메일인증을 사용한다면
|
||||
if( defined('G5_SOCIAL_CERTIFY_MAIL') && G5_SOCIAL_CERTIFY_MAIL && $config['cf_use_email_certify'] ){
|
||||
|
||||
} else {
|
||||
//로그인 처리 합니다.
|
||||
// 회원아이디 세션 생성
|
||||
set_session('ss_mb_id', $mb['mb_id']);
|
||||
|
||||
set_session('ss_mb_reg', $mb['mb_id']);
|
||||
}
|
||||
|
||||
if( !empty($user_profile->photoURL) ){ //회원 프로필 사진이 있다면
|
||||
//해당 처리
|
||||
|
||||
$mb_dir = G5_DATA_PATH.'/member/'.substr($mb_id,0,2);
|
||||
@mkdir($mb_dir, G5_DIR_PERMISSION);
|
||||
@chmod($mb_dir, G5_DIR_PERMISSION);
|
||||
$dest_path = "$mb_dir/$mb_id.gif";
|
||||
|
||||
social_profile_img_resize($dest_path, $user_profile->photoURL, $config['cf_member_icon_width'], $config['cf_member_icon_height'] );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,14 +114,32 @@ if($result) {
|
||||
mailer($mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content, 1);
|
||||
}
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
|
||||
//소셜 로그인 계정 추가
|
||||
if( function_exists('social_login_success_after') ){
|
||||
$mb = get_member($mb_id);
|
||||
social_login_success_after($mb, '', 'register');
|
||||
}
|
||||
|
||||
// 메일인증을 사용한다면
|
||||
if( ! $mb_email_certify ){
|
||||
set_session('ss_mb_reg', $mb['mb_id']);
|
||||
|
||||
if( !empty($user_profile->photoURL) ){ //회원 프로필 사진이 있다면
|
||||
//해당 처리
|
||||
|
||||
$mb_dir = G5_DATA_PATH.'/member/'.substr($mb_id,0,2);
|
||||
@mkdir($mb_dir, G5_DIR_PERMISSION);
|
||||
@chmod($mb_dir, G5_DIR_PERMISSION);
|
||||
$dest_path = "$mb_dir/$mb_id.gif";
|
||||
|
||||
social_profile_img_resize($dest_path, $user_profile->photoURL, $config['cf_member_icon_width'], $config['cf_member_icon_height'] );
|
||||
}
|
||||
|
||||
if( $mb_email_certify ){ //메일인증 사용 안하면
|
||||
|
||||
//바로 로그인 처리
|
||||
set_session('ss_mb_id', $mb['mb_id']);
|
||||
|
||||
} else { // 메일인증을 사용한다면
|
||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||
|
||||
// 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
|
||||
|
||||
Reference in New Issue
Block a user