]> git.mxchange.org Git - friendica-addons.git/commitdiff
abandoned account feature
authorFriendika <info@friendika.com>
Fri, 30 Sep 2011 04:57:17 +0000 (21:57 -0700)
committerFriendika <info@friendika.com>
Fri, 30 Sep 2011 04:57:17 +0000 (21:57 -0700)
facebook.tgz
facebook/facebook.php

index 05c7c735fb916966b35732f13b059f6ea80ec9c3..a1617de59b08a04cf40f8a3607271b80ba8c9cef 100644 (file)
Binary files a/facebook.tgz and b/facebook.tgz differ
index 7ffdaffac52a3f8d41d1b344828e4c587d4b9e7d..0205204afd65ca88936be4309c49605b492fe0b6 100644 (file)
@@ -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)