diff options
| author | David King <developers@inqbation.com> | 2013-07-03 12:46:18 -0400 |
|---|---|---|
| committer | David King <developers@inqbation.com> | 2013-07-03 12:46:18 -0400 |
| commit | 73c289ae49cc43066a8642463db8afb522a59262 (patch) | |
| tree | e668a03aab680ebf16b4e3a26e26fac588af41d4 /phpBB/includes/auth/auth.php | |
| parent | 8ce7d36f70111fc31f71708742e89a65014eb721 (diff) | |
| parent | f9672e9b45a0f0d26702ca0f55a884a24e21bf77 (diff) | |
| download | forums-73c289ae49cc43066a8642463db8afb522a59262.tar forums-73c289ae49cc43066a8642463db8afb522a59262.tar.gz forums-73c289ae49cc43066a8642463db8afb522a59262.tar.bz2 forums-73c289ae49cc43066a8642463db8afb522a59262.tar.xz forums-73c289ae49cc43066a8642463db8afb522a59262.zip | |
Merge remote-tracking branch 'Hardolaf/feature/auth-refactor' into develop
* Hardolaf/feature/auth-refactor: (44 commits)
[feature/auth-refactor] Fix code style issue
[feature/auth-refactor] Fix comment grammar
[feature/auth-refactor] Fix the actual cause of test failures
[feature/auth-refactor] A possible fix for the functional test failures
[feature/auth-refactor] Forgot @inheritdoc on methods
[feature/auth-refactor] Finish and clean up documentation
[feature/auth-refactor] Change phpEx to php_ext in new classes
[feature/auth-refactor] Fix two session tests broken by changes
[feature/auth-refactor] Removed no longer used variable
[feature/auth-refactor] Fix errors in acp_board
[feature/auth-refactor] Fix indentation on acp_board
[feature/auth-refactor] Refactor auth in acp_board
[feature/auth-refactor] Don't truncate name then reattach same thing
[feature/auth-refactor] Remove old auth plugins
[feature/auth-refactor] Remove references to old auth plugins
[feature/auth-refactor] Fix auth tests to use mock objects correctly
[feature/auth-refactor] Test validate_session on provider_apache
[feature/auth-refactor] Test autologin() on provider_apache
[feature/auth-refactor] Test login() for provider_apache
[feature/auth-refactor] Test for init on provider_apache
...
Diffstat (limited to 'phpBB/includes/auth/auth.php')
| -rw-r--r-- | phpBB/includes/auth/auth.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/phpBB/includes/auth/auth.php b/phpBB/includes/auth/auth.php index 2535247571..279959974d 100644 --- a/phpBB/includes/auth/auth.php +++ b/phpBB/includes/auth/auth.php @@ -927,15 +927,14 @@ 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'])); - include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx); - $method = 'login_' . $method; - if (function_exists($method)) + $provider = $phpbb_container->get('auth.provider.' . $method); + if ($provider) { - $login = $method($username, $password, $user->ip, $user->browser, $user->forwarded_for); + $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) |
