aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-06-18 16:55:35 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-06-18 16:57:59 -0400
commit7bdab205a13380242ef2469d192abc22b48010d8 (patch)
treeb3123fa5cddf3f3482f6bdc38f3295daafe66d04 /phpBB/includes
parent0432c3273992cf44b711fad92d442c81016a96c1 (diff)
downloadforums-7bdab205a13380242ef2469d192abc22b48010d8.tar
forums-7bdab205a13380242ef2469d192abc22b48010d8.tar.gz
forums-7bdab205a13380242ef2469d192abc22b48010d8.tar.bz2
forums-7bdab205a13380242ef2469d192abc22b48010d8.tar.xz
forums-7bdab205a13380242ef2469d192abc22b48010d8.zip
[feature/auth-refactor] Refactor login to use new interface
Refactors auth.php to use the provider_interface during login. PHPBB-9734
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/auth/auth.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/auth/auth.php b/phpBB/includes/auth/auth.php
index 2535247571..009e621e13 100644
--- a/phpBB/includes/auth/auth.php
+++ b/phpBB/includes/auth/auth.php
@@ -932,10 +932,11 @@ class phpbb_auth
$method = trim(basename($config['auth_method']));
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
- $method = 'login_' . $method;
- if (function_exists($method))
+ $class = 'phpbb_auth_provider_' . $method;
+ if (class_exists($class))
{
- $login = $method($username, $password, $user->ip, $user->browser, $user->forwarded_for);
+ $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
if ($login['status'] == LOGIN_SUCCESS_CREATE_PROFILE)