summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-08-18 22:18:01 +0000
committerZach Copley <zach@controlyourself.ca>2009-08-18 22:18:01 +0000
commit486167ad8e4011292587d4a1ed569a18d50b4a27 (patch)
treea1552b10a4e11e2539f845f7ec3697b0a61c9909
parentce004083d9c3c22cacaf059aae3cfd725fda6936 (diff)
Kick user out if she doesn't have FB cookies
-rw-r--r--plugins/FBConnect/FBConnectAuth.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/plugins/FBConnect/FBConnectAuth.php b/plugins/FBConnect/FBConnectAuth.php
index a3e2cdadc..5b9d604e3 100644
--- a/plugins/FBConnect/FBConnectAuth.php
+++ b/plugins/FBConnect/FBConnectAuth.php
@@ -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;