From 56da0d90e346cf31be3c8143029ce91c190bf7fe Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 17 Nov 2017 18:21:18 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=85=9C=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EA=B0=80=EC=9E=85=20=EC=B2=98=EB=A6=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/social/includes/functions.php | 24 ------------------------ plugin/social/register_member_update.php | 24 +++++++++++++++++++++--- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/plugin/social/includes/functions.php b/plugin/social/includes/functions.php index 8dce22a93..6c1857647 100644 --- a/plugin/social/includes/functions.php +++ b/plugin/social/includes/functions.php @@ -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; } diff --git a/plugin/social/register_member_update.php b/plugin/social/register_member_update.php index be29db0fa..2cbbfc368 100644 --- a/plugin/social/register_member_update.php +++ b/plugin/social/register_member_update.php @@ -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'].'] 인증확인 메일입니다.'; // 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용