mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
social_login_config::getSupportedConfiguredProviderConfigs()
is a better name than `\social_login_config::getValidConfiguredProviderConfigs()` because the method does not validate the provider configs.
This commit is contained in:
@@ -105,7 +105,7 @@ class core_system_xup_controller extends eController
|
|||||||
|
|
||||||
|
|
||||||
$testUrl = SITEURL."?route=system/xup/test";
|
$testUrl = SITEURL."?route=system/xup/test";
|
||||||
$providers = $manager->getValidConfiguredProviderConfigs();
|
$providers = $manager->getSupportedConfiguredProviderConfigs();
|
||||||
|
|
||||||
foreach($providers as $key=>$var)
|
foreach($providers as $key=>$var)
|
||||||
{
|
{
|
||||||
|
@@ -125,7 +125,7 @@ class signup_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
|
|
||||||
$manager = new social_login_config(e107::getConfig());
|
$manager = new social_login_config(e107::getConfig());
|
||||||
$providers = $manager->getValidConfiguredProviderConfigs();
|
$providers = $manager->getSupportedConfiguredProviderConfigs();
|
||||||
|
|
||||||
foreach ($providers as $p => $v)
|
foreach ($providers as $p => $v)
|
||||||
{
|
{
|
||||||
|
@@ -1145,7 +1145,7 @@ class e_user_provider
|
|||||||
{
|
{
|
||||||
$this->_config = array(
|
$this->_config = array(
|
||||||
"callback" => $this->generateCallbackUrl($provider),
|
"callback" => $this->generateCallbackUrl($provider),
|
||||||
"providers" => $this->social_login_config_manager->getValidConfiguredProviderConfigs(),
|
"providers" => $this->social_login_config_manager->getSupportedConfiguredProviderConfigs(),
|
||||||
"debug_mode" => 'error',
|
"debug_mode" => 'error',
|
||||||
"debug_file" => e_LOG . "hybridAuth.log"
|
"debug_file" => e_LOG . "hybridAuth.log"
|
||||||
);
|
);
|
||||||
|
@@ -162,9 +162,13 @@ class social_login_config
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get configs of providers that are supported and configured
|
* Get configs of providers that are supported and configured
|
||||||
|
*
|
||||||
|
* These configs are not validated here by the social login implementation.
|
||||||
|
* This method only filters out providers that are not supported and not configured.
|
||||||
|
*
|
||||||
* @return array Associative array where the key is the denormalized provider name and the value is its config
|
* @return array Associative array where the key is the denormalized provider name and the value is its config
|
||||||
*/
|
*/
|
||||||
public function getValidConfiguredProviderConfigs()
|
public function getSupportedConfiguredProviderConfigs()
|
||||||
{
|
{
|
||||||
$supported_providers = $this->getSupportedProviders();
|
$supported_providers = $this->getSupportedProviders();
|
||||||
$configured_providers = $this->getConfiguredProviders();
|
$configured_providers = $this->getConfiguredProviders();
|
||||||
@@ -233,6 +237,9 @@ class social_login_config
|
|||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
protected function getSocialLoginConfig()
|
protected function getSocialLoginConfig()
|
||||||
{
|
{
|
||||||
$config = $this->config->get(self::SOCIAL_LOGIN_PREF);
|
$config = $this->config->get(self::SOCIAL_LOGIN_PREF);
|
||||||
|
Reference in New Issue
Block a user