From: Friendika Date: Fri, 30 Sep 2011 04:57:17 +0000 (-0700) Subject: abandoned account feature X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=60696c01e7ed4e5dc8188a6f76c43b96b492df2b;p=friendica-addons.git abandoned account feature --- diff --git a/facebook.tgz b/facebook.tgz index 05c7c735..a1617de5 100644 Binary files a/facebook.tgz and b/facebook.tgz differ diff --git a/facebook/facebook.php b/facebook/facebook.php index 7ffdaffa..0205204a 100644 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -428,6 +428,16 @@ function facebook_cron($a,$b) { foreach($r as $rr) { if(get_pconfig($rr['uid'],'facebook','no_linking')) continue; + $ab = intval(get_config('system','account_abandon_days')); + if($ab > 0) { + $z = q("SELECT `uid` FROM `user` WHERE `uid` = %d AND `login_date` > UTC_TIMESTAMP() - INTERVAL %d DAY LIMIT 1", + intval($rr['uid']), + intval($ab) + ); + if(! count($z)) + continue; + } + // check for new friends once a day $last_friend_check = get_pconfig($rr['uid'],'facebook','friend_check'); if($last_friend_check)