aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Cron.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2016-08-02 10:56:47 +0200
committerzottel <github@zottel.net>2016-08-02 10:56:47 +0200
commitdd83f6f3567ffa58b6addf2bc070ee244c868138 (patch)
treee9b9ab6e5b9b04a5a667f1ae0363b5f11d140f52 /Zotlabs/Daemon/Cron.php
parent55eda16b61041cf5d3aa941f3b2b4329246b1028 (diff)
parent69354e808f35b57e169fa662b75498a97dd1dfee (diff)
downloadvolse-hubzilla-dd83f6f3567ffa58b6addf2bc070ee244c868138.tar.gz
volse-hubzilla-dd83f6f3567ffa58b6addf2bc070ee244c868138.tar.bz2
volse-hubzilla-dd83f6f3567ffa58b6addf2bc070ee244c868138.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'Zotlabs/Daemon/Cron.php')
-rw-r--r--Zotlabs/Daemon/Cron.php10
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