일부 소셜 로그인 소스 수정
This commit is contained in:
1 parent
365b5e53a9
commit
ffb3cb7fd8
2 files changed
+16
-6
No files matched your search
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user