일부 소셜 로그인 소스 수정
This commit is contained in:
@@ -327,6 +327,9 @@ function social_extends_get_keys($provider){
|
||||
"keys" => array("id" => $config['cf_google_clientid'],
|
||||
"secret" => $config['cf_google_secret']),
|
||||
"redirect_uri" => get_social_callbackurl('google'),
|
||||
"scope" => "https://www.googleapis.com/auth/plus.login ". // optional
|
||||
"https://www.googleapis.com/auth/plus.me ". // optional
|
||||
"https://www.googleapis.com/auth/plus.profile.emails.read", // optional
|
||||
//"access_type" => "offline", // optional
|
||||
//"approval_prompt" => "force", // optional
|
||||
);
|
||||
@@ -470,6 +473,10 @@ function social_check_login_before($p_service=''){
|
||||
// then grab the user profile
|
||||
$user_profile = $adapter->getUserProfile();
|
||||
|
||||
if( ! (isset($_SESSION['sl_userprofile']) && is_array($_SESSION['sl_userprofile'])) ){
|
||||
$_SESSION['sl_userprofile'] = array();
|
||||
}
|
||||
|
||||
if( ! $is_member ){
|
||||
$_SESSION['sl_userprofile'][$provider_name] = json_encode( $user_profile );
|
||||
}
|
||||
|
||||
@@ -29,12 +29,15 @@ $mb_email = trim($_POST['mb_email']);
|
||||
$mb_name = clean_xss_tags(trim(strip_tags($_POST['mb_name'])));
|
||||
$mb_email = get_email_address($mb_email);
|
||||
|
||||
if( function_exists('filter_var') ){
|
||||
$mb_nick = filter_var($mb_nick, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
|
||||
$mb_name = filter_var($mb_name, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
|
||||
} else {
|
||||
$mb_nick = sql_real_escape_string($mb_nick);
|
||||
$mb_name = sql_real_escape_string($mb_name);
|
||||
// 이름, 닉네임에 utf-8 이외의 문자가 포함됐다면 오류
|
||||
// 서버환경에 따라 정상적으로 체크되지 않을 수 있음.
|
||||
$tmp_mb_name = iconv('UTF-8', 'UTF-8//IGNORE', $mb_name);
|
||||
if($tmp_mb_name != $mb_name) {
|
||||
$mb_name = $tmp_mb_name;
|
||||
}
|
||||
$tmp_mb_nick = iconv('UTF-8', 'UTF-8//IGNORE', $mb_nick);
|
||||
if($tmp_mb_nick != $mb_nick) {
|
||||
$mb_nick = $tmp_mb_nick;
|
||||
}
|
||||
|
||||
if( ! $mb_nick || ! $mb_name ){
|
||||
|
||||
Reference in New Issue
Block a user