From cd30c94096194dd53fff510606334f1cfbe92cc0 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 27 Sep 2011 16:59:10 +0000 Subject: [PATCH] Move check for valid access token to the right place --- plugins/FacebookBridge/actions/facebookfinishlogin.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/FacebookBridge/actions/facebookfinishlogin.php b/plugins/FacebookBridge/actions/facebookfinishlogin.php index 4c8c9f860f..2703ab8554 100644 --- a/plugins/FacebookBridge/actions/facebookfinishlogin.php +++ b/plugins/FacebookBridge/actions/facebookfinishlogin.php @@ -44,10 +44,11 @@ class FacebookfinishloginAction extends Action if (isset($_COOKIE['fb_access_token'])) { $this->accessToken = $_COOKIE['fb_access_token']; - if (empty($this->accessToken)) { - $this->clientError(_m("Unable to authenticate you with Facebook.")); - return false; - } + } + + if (empty($this->accessToken)) { + $this->clientError(_m("Unable to authenticate you with Facebook.")); + return false; } $graphUrl = 'https://graph.facebook.com/me?access_token=' . urlencode($this->accessToken); -- 2.39.5