mirror of
https://github.com/e107inc/e107.git
synced 2025-08-21 13:52:35 +02:00
Suppress uncaught Hybridauth exceptions in e_user_provider
And add a check for those exceptions in `social_ui::generateSocialLoginSection()` Fixes: #4192
This commit is contained in:
@@ -606,6 +606,19 @@ class social_ui extends e_admin_ui
|
||||
|
||||
foreach ($provider_names as $provider_name)
|
||||
{
|
||||
// Check if the current configuration for the provider is valid
|
||||
try
|
||||
{
|
||||
new e_user_provider($provider_name, [], false);
|
||||
}
|
||||
catch (\Hybridauth\Exception\InvalidArgumentException $e)
|
||||
{
|
||||
e107::getMessage()->addError("[{$e->getCode()}] {$e->getMessage()}");
|
||||
}
|
||||
catch (\Hybridauth\Exception\UnexpectedValueException $ignored)
|
||||
{
|
||||
}
|
||||
|
||||
$text .= $this->generateSocialLoginRow($provider_name, $readonly);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user