mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/12352] Revert to db auth provider if default does not exist
This will make sure that we will not encounter a non-existing auth provider. We will revert to the default db auth provider if the one set in the config does not exist in our auth provider collection. PHPBB3-12352
This commit is contained in:
@@ -410,7 +410,14 @@ class session
|
||||
// Check whether the session is still valid if we have one
|
||||
$method = basename(trim($config['auth_method']));
|
||||
|
||||
$provider = $phpbb_container->get('auth.provider.' . $method);
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
|
||||
// Revert to db auth provider if selected method does not exist
|
||||
if (!isset($provider_collection['auth.provider.' . $method]))
|
||||
{
|
||||
$method = 'db';
|
||||
}
|
||||
$provider = $provider_collection['auth.provider.' . $method];
|
||||
|
||||
if (!($provider instanceof \phpbb\auth\provider\provider_interface))
|
||||
{
|
||||
@@ -579,7 +586,14 @@ class session
|
||||
|
||||
$method = basename(trim($config['auth_method']));
|
||||
|
||||
$provider = $phpbb_container->get('auth.provider.' . $method);
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
|
||||
// Revert to db auth provider if selected method does not exist
|
||||
if (!isset($provider_collection['auth.provider.' . $method]))
|
||||
{
|
||||
$method = 'db';
|
||||
}
|
||||
$provider = $provider_collection['auth.provider.' . $method];
|
||||
$this->data = $provider->autologin();
|
||||
|
||||
if (sizeof($this->data))
|
||||
|
Reference in New Issue
Block a user