mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Issue #2055 - Ability to set a "scope" for HybridAuth provider.
This commit is contained in:
@@ -158,7 +158,7 @@ class social_ui extends e_admin_ui
|
||||
"keys" => array ( "id" => "", "secret" => "" ),
|
||||
"trustForwarded" => false,
|
||||
// A comma-separated list of permissions you want to request from the user. See the Facebook docs for a full list of available permissions: http://developers.facebook.com/docs/reference/api/permissions.
|
||||
"scope" => "",
|
||||
"scope" => "email",
|
||||
|
||||
// The display context to show the authentication page. Options are: page, popup, iframe, touch and wap. Read the Facebook docs for more details: http://developers.facebook.com/docs/reference/dialogs#display. Default: page
|
||||
"display" => ""
|
||||
@@ -171,13 +171,14 @@ class social_ui extends e_admin_ui
|
||||
|
||||
"Github" => array (
|
||||
"enabled" => true,
|
||||
"keys" => array ( "id" => "", "secret" => "" )
|
||||
"keys" => array ( "id" => "", "secret" => "" ),
|
||||
"scope" => "user:email",
|
||||
),
|
||||
|
||||
"Google" => array (
|
||||
"enabled" => true,
|
||||
"keys" => array ( "id" => "", "secret" => "" ),
|
||||
"scope" => ""
|
||||
"scope" => "email"
|
||||
),
|
||||
/*
|
||||
"Instagram" => array (
|
||||
@@ -319,6 +320,7 @@ class social_ui extends e_admin_ui
|
||||
<col style='width:10%' />
|
||||
<col class='col-control' />
|
||||
<col class='col-control' />
|
||||
<col class='col-control' />
|
||||
<col style='width:20%' />
|
||||
</colgroup>
|
||||
<thead>
|
||||
@@ -326,6 +328,7 @@ class social_ui extends e_admin_ui
|
||||
<th>".LAN_SOCIAL_ADMIN_04."</th>
|
||||
<th>".LAN_SOCIAL_ADMIN_05."</th>
|
||||
<th>".LAN_SOCIAL_ADMIN_06."</th>
|
||||
<th>".LAN_SOCIAL_ADMIN_38."</th>
|
||||
<th class='center'>".LAN_SOCIAL_ADMIN_03."</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -374,7 +377,9 @@ class social_ui extends e_admin_ui
|
||||
break;
|
||||
|
||||
case 'scope':
|
||||
$textScope .= $frm->hidden('social_login['.$prov.'][scope]','email');
|
||||
$eopt = array( 'size'=>'block-level');
|
||||
$keyCount[] = 1;
|
||||
$textScope .= "<td>".$frm->text('social_login['.$prov.'][scope]', vartrue($pref['social_login'][$prov]['scope']), 100, $eopt)."</td>";
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -389,16 +394,20 @@ class social_ui extends e_admin_ui
|
||||
|
||||
|
||||
|
||||
if(empty($keyCount))
|
||||
{
|
||||
$textKeys = "<td> </td><td> </td>";
|
||||
}
|
||||
elseif(count($keyCount) == 1)
|
||||
{
|
||||
$textKeys .= "<td> </td>";
|
||||
}
|
||||
if(empty($keyCount))
|
||||
{
|
||||
$textKeys = "<td> </td><td> </td><td> </td>";
|
||||
}
|
||||
elseif(count($keyCount) == 1)
|
||||
{
|
||||
$textKeys .= "<td> </td><td> </td>";
|
||||
}
|
||||
elseif(count($keyCount) == 2)
|
||||
{
|
||||
$textKeys .= "<td> </td>";
|
||||
}
|
||||
|
||||
$text .= $textKeys."<td class='center'>".$textEnabled.$textScope."</td>";
|
||||
$text .= $textKeys.$textScope."<td class='center'>".$textEnabled."</td>";
|
||||
|
||||
$text .= "
|
||||
</tr>
|
||||
|
@@ -45,6 +45,6 @@ define("LAN_SOCIAL_ADMIN_34", "Number of tweets to display.");
|
||||
define("LAN_SOCIAL_ADMIN_35", "Light");
|
||||
define("LAN_SOCIAL_ADMIN_36", "Dark");
|
||||
define("LAN_SOCIAL_ADMIN_37", "Open Graph Meta");
|
||||
|
||||
define("LAN_SOCIAL_ADMIN_38", "Scope");
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user