1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Core modifications to support Hybridauth 3

- MOD: Replaced e107::getPref('social_login') with
       SocialLoginConfigManager::getValidConfiguredProviderConfigs()
- FIX: signup_shortcodes updated with new social login providers
- MOD: e107::filter_request() code de-duplication: HTTP 400 exits
- MOD: Deprecated e107::getHybridAuth() to discourage direct access to
       third-party dependency Hybridauth
- FIX: Updated e_user_provider for Hybridauth 3
- FIX: e_user::tryProviderSession() and Hybridauth 3
- NEW: Dynamic auth provider support in social_adminarea
- NEW: Database migration for social plugin's social_login pref
This commit is contained in:
Nick Liu
2020-02-17 10:36:03 +01:00
parent 46c75ae4d0
commit 91bfc1df23
12 changed files with 1228 additions and 509 deletions

View File

@@ -20,8 +20,18 @@ class core_system_xup_controller extends eController
{
var $backUrl = null;
/**
* @var SocialLoginConfigManager
*/
private $social_login_config_manager;
public function __construct(eRequest $request, eResponse $response = null)
{
parent::__construct($request, $response);
require_once(e_PLUGIN."social/SocialLoginConfigManager.php");
$this->social_login_config_manager = new SocialLoginConfigManager(e107::getConfig());
}
public function init()
{
//$back = 'system/xup/test';
@@ -113,9 +123,11 @@ class core_system_xup_controller extends eController
echo ' '.LAN_XUP_ERRM_11.' '.(e107::getUser()->isUser() && !empty($profileData) ? '<span class="label label-success">true</span>' : '<span class="label label-danger">false</span>');
$testUrl = SITEURL."?route=system/xup/test";
$providers = e107::getPref('social_login', array());
$testUrl = SITEURL."?route=system/xup/test";
require_once(e_PLUGIN . "social/SocialLoginConfigManager.php");
$manager = new SocialLoginConfigManager(e107::getConfig());
$providers = $manager->getValidConfiguredProviderConfigs();
foreach($providers as $key=>$var)
{
if($var['enabled'] == 1)