mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[ticket/13248] Always use provider collection for getting provider
PHPBB3-13248
This commit is contained in:
parent
c3f5dc75be
commit
a9249bce5e
@ -34,11 +34,12 @@ class ucp_auth_link
|
||||
*/
|
||||
public function main($id, $mode)
|
||||
{
|
||||
global $config, $request, $template, $phpbb_container, $user;
|
||||
global $request, $template, $phpbb_container, $user;
|
||||
|
||||
$error = array();
|
||||
|
||||
$auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']);
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_provider = $provider_collection->get_provider();
|
||||
|
||||
// confirm that the auth provider supports this page
|
||||
$provider_data = $auth_provider->get_auth_link_data();
|
||||
|
@ -39,7 +39,7 @@ class ucp_login_link
|
||||
*/
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_container, $request, $template, $user;
|
||||
global $phpbb_container, $request, $template, $user;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
// Initialize necessary variables
|
||||
@ -57,8 +57,8 @@ class ucp_login_link
|
||||
}
|
||||
|
||||
// Use the auth_provider requested even if different from configured
|
||||
$auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
|
||||
$auth_provider = $phpbb_container->get($auth_provider);
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_provider = $provider_collection->get_provider($request->variable('auth_provider', ''));
|
||||
|
||||
// Set the link_method to login_link
|
||||
$data['link_method'] = 'login_link';
|
||||
|
@ -87,8 +87,8 @@ class ucp_register
|
||||
if (!empty($login_link_data))
|
||||
{
|
||||
// Confirm that we have all necessary data
|
||||
$auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
|
||||
$auth_provider = $phpbb_container->get($auth_provider);
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_provider = $provider_collection->get_provider($request->variable('auth_provider', ''));
|
||||
|
||||
$result = $auth_provider->login_link_has_necessary_data($login_link_data);
|
||||
if ($result !== null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user