diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-08-03 21:17:08 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-08-03 21:17:08 +0200 |
commit | b959641ca82d45f641a803b58dcfb91a90274956 (patch) | |
tree | fa658a7f3a8ab4f862e503ad2113fc24bffd0304 /Zotlabs/Daemon/Cron.php | |
parent | c50bfa07ca3a456d69d73988f42e58e3282879e9 (diff) | |
parent | 416adeb169f16fd25f7dbf54232451d8647cc999 (diff) | |
download | volse-hubzilla-b959641ca82d45f641a803b58dcfb91a90274956.tar.gz volse-hubzilla-b959641ca82d45f641a803b58dcfb91a90274956.tar.bz2 volse-hubzilla-b959641ca82d45f641a803b58dcfb91a90274956.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'Zotlabs/Daemon/Cron.php')
-rw-r--r-- | Zotlabs/Daemon/Cron.php | 10 |
1 files changed, 7 insertions, 3 deletions
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 |