aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth/provider/oauth/service/facebook.php
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-08-24 22:00:16 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-08-24 22:04:04 -0400
commita8ffbce99f9ea99bd1fdca0e009001026e2d6950 (patch)
tree1cae1d43fee4c417eedd8303f581eb3109d083ab /phpBB/phpbb/auth/provider/oauth/service/facebook.php
parent310caec5d92d58453d1eee40e9b5a7f0157bd5ea (diff)
downloadforums-a8ffbce99f9ea99bd1fdca0e009001026e2d6950.tar
forums-a8ffbce99f9ea99bd1fdca0e009001026e2d6950.tar.gz
forums-a8ffbce99f9ea99bd1fdca0e009001026e2d6950.tar.bz2
forums-a8ffbce99f9ea99bd1fdca0e009001026e2d6950.tar.xz
forums-a8ffbce99f9ea99bd1fdca0e009001026e2d6950.zip
[feature/oauth] Changes due to code review
PHPBB3-11673
Diffstat (limited to 'phpBB/phpbb/auth/provider/oauth/service/facebook.php')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/facebook.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/service/facebook.php b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
index 836e4ee052..b853c8c8a5 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/facebook.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
@@ -66,15 +66,14 @@ class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oau
{
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
{
- // TODO: make exception class and use language constant
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
}
// This was a callback request, get the token
- $this->service_provider->requestAccessToken( $this->request->variable('code', '') );
+ $this->service_provider->requestAccessToken($this->request->variable('code', ''));
// Send a request with it
- $result = json_decode( $this->service_provider->request('/me'), true );
+ $result = json_decode($this->service_provider->request('/me'), true);
// Return the unique identifier
return $result['id'];
@@ -87,12 +86,11 @@ class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oau
{
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
{
- // TODO: make exception class and use language constant
- throw new Exception('Invalid service provider type');
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
}
// Send a request with it
- $result = json_decode( $this->service_provider->request('/me'), true );
+ $result = json_decode($this->service_provider->request('/me'), true);
// Return the unique identifier
return $result['id'];