aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-05-31 22:43:07 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-06-01 21:31:06 +0200
commit6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7 (patch)
tree3cd8ff3ae639535b97f99f203bc77b8c074ba115 /phpBB/includes/functions.php
parent306beab4cba155a933391c40c75f5dd9c57fd69e (diff)
downloadforums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar
forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar.gz
forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar.bz2
forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.tar.xz
forums-6f5f0d6d8d5d3afcabccaa9da7c64108af5d4ab7.zip
[ticket/12352] Use custom provider collection for auth providers
Using this custom provider collection, we can properly check whether the configured auth provider does exist. The method get_provider() has been added for returning the default auth provider or the standard db auth provider if the specified one does not exist. Additionally, the method get_provider() will throw an RuntimeException if none of the above exist. PHPBB3-12352
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 31a6246d34..0d0bc4e6f6 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2855,15 +2855,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
}
$provider_collection = $phpbb_container->get('auth.provider_collection');
- $auth_method = $config['auth_method'];
-
- // Revert to db auth provider if selected method does not exist
- if (!isset($provider_collection['auth.provider.' . $config['auth_method']]))
- {
- $auth_method = 'db';
- }
-
- $auth_provider = $provider_collection['auth.provider.' . $auth_method];
+ $auth_provider = $provider_collection->get_provider();
$auth_provider_data = $auth_provider->get_login_data();
if ($auth_provider_data)