]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Kick user out if she doesn't have FB cookies
authorZach Copley <zach@controlyourself.ca>
Tue, 18 Aug 2009 22:18:01 +0000 (22:18 +0000)
committerZach Copley <zach@controlyourself.ca>
Tue, 18 Aug 2009 22:18:01 +0000 (22:18 +0000)
plugins/FBConnect/FBConnectAuth.php

index a3e2cdadcdd5baad904d9703babbbf75b690774c..5b9d604e3657bdb2ec761f5b681b6c6f82a2738a 100644 (file)
@@ -38,20 +38,14 @@ class FBConnectauthAction extends Action
     function prepare($args) {
         parent::prepare($args);
 
-        try {
-
-            $this->fbuid = getFacebook()->get_loggedin_user();
+        $this->fbuid = getFacebook()->get_loggedin_user();
 
-            if ($this->fbuid > 0) {
-                $this->fb_fields = $this->getFacebookFields($this->fbuid,
-                    array('first_name', 'last_name', 'name'));
-            } else {
-                common_debug("No Facebook User found.");
-            }
-
-        } catch (Exception $e) {
-            common_log(LOG_WARNING, 'Problem getting Facebook uid: ' .
-                $e->getMessage());
+        if ($this->fbuid > 0) {
+            $this->fb_fields = $this->getFacebookFields($this->fbuid,
+                                                        array('first_name', 'last_name', 'name'));
+        } else {
+            $this->clientError(_('You must be logged into Facebook to ' .
+                                 'use Facebook Connect.'));
         }
 
         return true;