From 3a7d3e3a542ef9297a8a20e3548f01f43fb37f0e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 1 Aug 2016 20:12:52 -0700 Subject: This checkin should make all permission modes work correctly with atokens (they should be able to post content if allowed to). It also removes the strict linkage between permissions and connections so any individual permission can be set for any xchan; even those for which you have no connections. --- Zotlabs/Daemon/Cron.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Daemon/Cron.php') diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index c6e82b13a..c66b62f55 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -64,12 +64,16 @@ class Cron { // delete expired access tokens - q("delete from atoken where atoken_expires != '%s' && atoken_expires < %s", + $r = q("select atoken_id from atoken where atoken_expires != '%s' && atoken_expires < %s", dbesc(NULL_DATE), db_utcnow() ); - - + if($r) { + require_once('include/security.php'); + foreach($r as $rr) { + atoken_delete($rr['atoken_id']); + } + } // Ensure that every channel pings a directory server once a month. This way we can discover // channels and sites that quietly vanished and prevent the directory from accumulating stale -- cgit v1.2.3