diff options
-rw-r--r-- | phpBB/phpbb/auth/provider/oauth/oauth.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php index 6f2fc52cfa..9be404dade 100644 --- a/phpBB/phpbb/auth/provider/oauth/oauth.php +++ b/phpBB/phpbb/auth/provider/oauth/oauth.php @@ -128,7 +128,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base // Requst the name of the OAuth service $service_name = $this->request->variable('oauth_service', '', false, phpbb_request_interface::POST); $service_name = strtolower($service_name); - if ($service_name === '' && isset($this->services[$service_name])) + if ($service_name === '' || !array_key_exists($service_name, $this->service_providers)) { return array( 'status' => LOGIN_ERROR_EXTERNAL_AUTH, @@ -139,15 +139,15 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base } // Get the service credentials for the given service - $service_credentials = $this->services[$service_name]->get_credentials(); + $service_credentials = $this->service_providers[$service_name]->get_credentials(); $storage = new phpbb_auth_provider_oauth_token_storage($this->db, $this->user, $service_name, $this->auth_provider_oauth_token_storage_table); - $service = $this->get_service($service_name, $storage, $service_credentials, $this->services[$service_name]->get_auth_scope()); + $service = $this->get_service($service_name, $storage, $service_credentials, $this->service_providers[$service_name]->get_auth_scope()); if ($this->request->is_set('code', phpbb_request_interface::GET)) { - $this->services[$service_name]->set_external_service_provider($service); - $unique_id = $this->services[$service_name]->perform_auth_login(); + $this->service_providers[$service_name]->set_external_service_provider($service); + $unique_id = $this->service_providers[$service_name]->perform_auth_login(); // Check to see if this provider is already assosciated with an account $data = array( |