From 5fc226b86518e6725be30121760830ef8b08f42e Mon Sep 17 00:00:00 2001
From: Andjelko Horvat <comel@vingd.com>
Date: Thu, 5 Jan 2012 12:15:46 +0000
Subject: [PATCH] authfacebook: minor uid check fix.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3007 44740490-163a-0410-bde0-09ae8108e29a
---
modules/authfacebook/lib/Auth/Source/Facebook.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/authfacebook/lib/Auth/Source/Facebook.php b/modules/authfacebook/lib/Auth/Source/Facebook.php
index 642db0bea..67ab3cbf0 100644
--- a/modules/authfacebook/lib/Auth/Source/Facebook.php
+++ b/modules/authfacebook/lib/Auth/Source/Facebook.php
@@ -90,9 +90,9 @@ class sspmod_authfacebook_Auth_Source_Facebook extends SimpleSAML_Auth_Source {
$facebook = new sspmod_authfacebook_Facebook(array('appId' => $this->api_key, 'secret' => $this->secret), $state);
$uid = $facebook->getUser();
- if (isset($uid)) {
+ if (isset($uid) && $uid) {
try {
- $info = $facebook->api("/me");
+ $info = $facebook->api("/" . $uid);
} catch (FacebookApiException $e) {
throw new SimpleSAML_Error_AuthSource($this->authId, 'Error getting user profile.', $e);
}
--
GitLab