mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/auth-refactor] Refactor login to use new interface
Refactors auth.php to use the provider_interface during login. PHPBB-9734
This commit is contained in:
parent
0432c32739
commit
7bdab205a1
1 changed files with 4 additions and 3 deletions
|
@ -932,10 +932,11 @@ class phpbb_auth
|
||||||
$method = trim(basename($config['auth_method']));
|
$method = trim(basename($config['auth_method']));
|
||||||
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx);
|
||||||
|
|
||||||
$method = 'login_' . $method;
|
$class = 'phpbb_auth_provider_' . $method;
|
||||||
if (function_exists($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 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)
|
if ($login['status'] == LOGIN_SUCCESS_CREATE_PROFILE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue