aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-18 21:02:00 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-18 21:02:21 -0400
commitf852485513ee4e032cf9c25acb2d72980f783c24 (patch)
tree0b990e4748ebce7caffa47a302b1b7729ec6c534
parentb67032fb028b096b33c72fe7aabec55056243755 (diff)
downloadforums-f852485513ee4e032cf9c25acb2d72980f783c24.tar
forums-f852485513ee4e032cf9c25acb2d72980f783c24.tar.gz
forums-f852485513ee4e032cf9c25acb2d72980f783c24.tar.bz2
forums-f852485513ee4e032cf9c25acb2d72980f783c24.tar.xz
forums-f852485513ee4e032cf9c25acb2d72980f783c24.zip
[feature/oauth] Fix a bunch of errors in oauth.php
PHPBB3-11673
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php10
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(