summaryrefslogtreecommitdiff
path: root/plugins/Facebook/facebookremove.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-10-12 11:16:14 -0400
committerEvan Prodromou <evan@status.net>2010-10-12 11:16:14 -0400
commitf11c1c77cab7d7310ec0d2c17bc6f35c491f2871 (patch)
tree7d0741b5d1b68cfbfa21ed974abab04e7b721b0b /plugins/Facebook/facebookremove.php
parent1e3d5f80258811ce1c2154fcd971297e24264894 (diff)
parent1cd60579f5ac99a2c8bfb12d35093f5c74f14b04 (diff)
Merge remote branch 'gitorious/0.9.x' into 0.9.x
Diffstat (limited to 'plugins/Facebook/facebookremove.php')
-rw-r--r--plugins/Facebook/facebookremove.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/Facebook/facebookremove.php b/plugins/Facebook/facebookremove.php
index b048a435f..bc76daaef 100644
--- a/plugins/Facebook/facebookremove.php
+++ b/plugins/Facebook/facebookremove.php
@@ -48,6 +48,12 @@ class FacebookremoveAction extends FacebookAction
$flink = Foreign_link::getByForeignID($this->arg('fb_sig_user'), 2);
+ if (!$flink) {
+ common_log(LOG_ERR, "Tried to delete missing foreign_link entry with Facebook ID " . $this->arg('fb_sig_user'));
+ $this->serverError(_m('Couldn\'t remove Facebook user: already deleted.'));
+ return;
+ }
+
common_debug("Removing foreign link to Facebook - local user ID: $flink->user_id, Facebook ID: $flink->foreign_id");
$result = $flink->delete();