]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/FacebookBridge/actions/facebookfinishlogin.php
common_redirect and clientError exits, so refactor
[quix0rs-gnu-social.git] / plugins / FacebookBridge / actions / facebookfinishlogin.php
index 66ac174ef2c0aede4d3e1f6c25c2f31d99a22c10..ab83601ce1e976089bbbb26a114888add976f494 100644 (file)
@@ -54,12 +54,7 @@ class FacebookfinishloginAction extends Action
         $graphUrl = 'https://graph.facebook.com/me?access_token=' . urlencode($this->accessToken);
         $this->fbuser = json_decode(file_get_contents($graphUrl));
 
-        if (!empty($this->fbuser)) {
-            $this->fbuid  = $this->fbuser->id;
-            // OKAY, all is well... proceed to register
-            return true;
-        } else {
-
+        if (empty($this->fbuser)) {
             // log badness
 
             list($proxy, $ip) = common_client_ip();
@@ -80,7 +75,9 @@ class FacebookfinishloginAction extends Action
             );
         }
 
-        return false;
+        $this->fbuid  = $this->fbuser->id;
+        // OKAY, all is well... proceed to register
+        return true;
     }
 
     function handle($args)