diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-21 18:04:11 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-21 18:04:11 -0400 |
commit | b8610c4b989fd1e4e9e310de776de38dfe4a09a2 (patch) | |
tree | 01e7fafd5f3ac72a2188ca28e8c1c559d0097b65 /phpBB/includes/auth | |
parent | 95f38b457e6b00cbc3b15b7768d435d467f5bc2c (diff) | |
download | forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar.gz forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar.bz2 forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar.xz forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.zip |
[feature/auth-refactor] Refactor code to use services
Refactors all loading of auth providers to use services instead of
directly calling the class.
PHPBB3-9734
Diffstat (limited to 'phpBB/includes/auth')
-rw-r--r-- | phpBB/includes/auth/auth.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/phpBB/includes/auth/auth.php b/phpBB/includes/auth/auth.php index ab84619977..279959974d 100644 --- a/phpBB/includes/auth/auth.php +++ b/phpBB/includes/auth/auth.php @@ -927,14 +927,13 @@ class phpbb_auth */ function login($username, $password, $autologin = false, $viewonline = 1, $admin = 0) { - global $config, $db, $user, $phpbb_root_path, $phpEx; + global $config, $db, $user, $phpbb_root_path, $phpEx, $phpbb_container; $method = trim(basename($config['auth_method'])); - $class = 'phpbb_auth_provider_' . $method; - if (class_exists($class)) + $provider = $phpbb_container->get('auth.provider.' . $method); + if ($provider) { - $provider = new $class(); $login = $provider->login($username, $password); // If the auth module wants us to create an empty profile do so and then treat the status as LOGIN_SUCCESS |