aboutsummaryrefslogtreecommitdiffstats
path: root/addon/facebook
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-19 01:17:12 -0700
committerFriendika <info@friendika.com>2011-09-19 01:17:12 -0700
commit2aef98f71d95ba5c2caae7637002daef0bce6de5 (patch)
treeffc8b84eedfdfed720b6e4ec14244f3a4bff44ef /addon/facebook
parent672ecc7f7d2e17b0d35eccc94e6fa1b5eef0d108 (diff)
downloadvolse-hubzilla-2aef98f71d95ba5c2caae7637002daef0bce6de5.tar.gz
volse-hubzilla-2aef98f71d95ba5c2caae7637002daef0bce6de5.tar.bz2
volse-hubzilla-2aef98f71d95ba5c2caae7637002daef0bce6de5.zip
cripple account when expired
Diffstat (limited to 'addon/facebook')
-rw-r--r--addon/facebook/facebook.php21
1 files changed, 16 insertions, 5 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index fe348f689..3268cb254 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -139,6 +139,12 @@ function fb_get_self($uid) {
function fb_get_friends($uid) {
+ $r = q("SELECT `id` FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1",
+ intval($uid)
+ );
+ if(! count($r))
+ return;
+
$access_token = get_pconfig($uid,'facebook','access_token');
$no_linking = get_pconfig($uid,'facebook','no_linking');
@@ -808,8 +814,18 @@ function fb_consume_all($uid) {
}
function fb_consume_stream($uid,$j,$wall = false) {
+
$a = get_app();
+
+ $user = q("SELECT `nickname`, `blockwall` FROM `user` WHERE `uid` = %d AND `account_expired` = 0 LIMIT 1",
+ intval($uid)
+ );
+ if(! count($user))
+ return;
+
+ $my_local_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
+
$no_linking = get_pconfig($uid,'facebook','no_linking');
if($no_linking)
return;
@@ -818,11 +834,6 @@ function fb_consume_stream($uid,$j,$wall = false) {
intval($uid)
);
- $user = q("SELECT `nickname`, `blockwall` FROM `user` WHERE `uid` = %d LIMIT 1",
- intval($uid)
- );
- if(count($user))
- $my_local_url = $a->get_baseurl() . '/profile/' . $user[0]['nickname'];
$self_id = get_pconfig($uid,'facebook','self_id');
if(! count($j->data) || (! strlen($self_id)))